[hibernate-issues] [JIRA] (HSEARCH-3752) Implicit nested predicates
Yoann Rodière (JIRA)
jira at hibernate.atlassian.net
Tue Feb 11 02:32:32 EST 2020
Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b ) *updated* an issue
Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiNTBlOGJjZjRkMWNhNDE2NTlkOGY5OGI3N2FjZDE1ZTQiLCJwIjoiaiJ9 ) / Improvement ( https://hibernate.atlassian.net/browse/HSEARCH-3752?atlOrigin=eyJpIjoiNTBlOGJjZjRkMWNhNDE2NTlkOGY5OGI3N2FjZDE1ZTQiLCJwIjoiaiJ9 ) HSEARCH-3752 ( https://hibernate.atlassian.net/browse/HSEARCH-3752?atlOrigin=eyJpIjoiNTBlOGJjZjRkMWNhNDE2NTlkOGY5OGI3N2FjZDE1ZTQiLCJwIjoiaiJ9 ) Implicit nested predicates ( https://hibernate.atlassian.net/browse/HSEARCH-3752?atlOrigin=eyJpIjoiNTBlOGJjZjRkMWNhNDE2NTlkOGY5OGI3N2FjZDE1ZTQiLCJwIjoiaiJ9 )
Change By: Yoann Rodière ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A58fa1ced-171a-4c00-97e8-5d70d442cc4b )
At the moment the only way to define a predicate targeting a nested field is using a {{ NestedPredicateFieldStep }} .
Hence we need to wrap the predicate on the target field with a:
{code:java}
nested().objectField( "nested" ).nest(...)
{code}
for each nested object we reach traversing the very targeting path.
We could instead allowing users to define such a query without worrying about the fact that a field may or may not be contained in a nested object. As we already do for nested sort and nested projection.
This is particularly important for the sub-case of the exists predicate which is targeting an object field.
in this case we should automatically add a join query ("nested" predicate), in order to match not just the fields within the target object, but also the fields contained in the nested objects that are contained in turn in the target object.
Probably to handle such a query we will need a boolean query grouping all the cases in Elasticsearch as well.
We won't remove the nested API, leaving to the user the chance to use the old/explicit syntax.
Because the explicit syntax could be useful for supporting advanced stuff, such as local filtering on child/parent join and so on and so forth...
( https://hibernate.atlassian.net/browse/HSEARCH-3752#add-comment?atlOrigin=eyJpIjoiNTBlOGJjZjRkMWNhNDE2NTlkOGY5OGI3N2FjZDE1ZTQiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3752#add-comment?atlOrigin=eyJpIjoiNTBlOGJjZjRkMWNhNDE2NTlkOGY5OGI3N2FjZDE1ZTQiLCJwIjoiaiJ9 )
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#100119- sha1:6c3d6e9 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200211/9c794c51/attachment.html
More information about the hibernate-issues
mailing list