[hibernate-issues] [JIRA] (HSEARCH-3943) Projection nesting: preserving the document structure in projections

Yoann Rodière (JIRA) jira at hibernate.atlassian.net
Tue Jun 9 04:37:55 EDT 2020


Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *created* an issue

Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiNzhlOGUxNWE2YzE5NDY0OGE5N2NkMjIyNjZmMmRhZDgiLCJwIjoiaiJ9 ) / New Feature ( https://hibernate.atlassian.net/browse/HSEARCH-3943?atlOrigin=eyJpIjoiNzhlOGUxNWE2YzE5NDY0OGE5N2NkMjIyNjZmMmRhZDgiLCJwIjoiaiJ9 ) HSEARCH-3943 ( https://hibernate.atlassian.net/browse/HSEARCH-3943?atlOrigin=eyJpIjoiNzhlOGUxNWE2YzE5NDY0OGE5N2NkMjIyNjZmMmRhZDgiLCJwIjoiaiJ9 ) Projection nesting: preserving the document structure in projections ( https://hibernate.atlassian.net/browse/HSEARCH-3943?atlOrigin=eyJpIjoiNzhlOGUxNWE2YzE5NDY0OGE5N2NkMjIyNjZmMmRhZDgiLCJwIjoiaiJ9 )

Issue Type: New Feature Assignee: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) Components: backend-elasticsearch, backend-lucene, engine Created: 09/Jun/2020 01:37 AM Fix Versions: 6.0.0.Beta-backlog-high-priority Priority: Major Reporter: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b )

As of HSEARCH-3391 ( https://hibernate.atlassian.net/browse/HSEARCH-3391 ) In Progress , given the following document:

{
 "authors": [{
   "firstName": "Daniel",
   "lastName": "Abraham"
 }, {
   "firstName" "Ty",
   "lastName": "Frank"
 }]
}

... you can retrieve all values of "authors.firstName" in a single list ( List<String> , ["Daniel", "Ty"] ), and you can retrieve all values of "authors.lastName" in another list ( List<String> , ["Abraham", "Frank"] ). These projections are effectively flattened, because the "authors" part of the structure is gone.

What you cannot do is retrieve all the pairs firstName / lastName. In order for that to be possible, we would need some way to tell Hibernate Search "these two fields must be grouped together for each author", similarly to the "nested" predicate.

Note that for the Elasticsearch backend we could make this "grouping" work regardless of whether "authors" is nested or flattened, because we have the full JSON. However, that's not the case for the Lucene backend.

Tickets depending on this: HSEARCH-3927 ( https://hibernate.atlassian.net/browse/HSEARCH-3927 ) Open

( https://hibernate.atlassian.net/browse/HSEARCH-3943#add-comment?atlOrigin=eyJpIjoiNzhlOGUxNWE2YzE5NDY0OGE5N2NkMjIyNjZmMmRhZDgiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3943#add-comment?atlOrigin=eyJpIjoiNzhlOGUxNWE2YzE5NDY0OGE5N2NkMjIyNjZmMmRhZDgiLCJwIjoiaiJ9 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100128- sha1:85a81c0 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200609/0e892a85/attachment.html 


More information about the hibernate-issues mailing list