[hibernate-issues] [JIRA] (HSEARCH-3846) NestedDocsProvider.childDocs always returns all results.

Waldemar Kłaczyński (JIRA) jira at hibernate.atlassian.net
Sun Mar 1 11:32:17 EST 2020


Waldemar Kłaczyński ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A77e50cac-bda3-4af4-9bb3-6461f4d10eea ) *updated* an issue

Hibernate Search ( https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMTQ5NmE0YWY0NDBhNDU3OGJlYTJjZjQyMDliYWMzYTciLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HSEARCH-3846?atlOrigin=eyJpIjoiMTQ5NmE0YWY0NDBhNDU3OGJlYTJjZjQyMDliYWMzYTciLCJwIjoiaiJ9 ) HSEARCH-3846 ( https://hibernate.atlassian.net/browse/HSEARCH-3846?atlOrigin=eyJpIjoiMTQ5NmE0YWY0NDBhNDU3OGJlYTJjZjQyMDliYWMzYTciLCJwIjoiaiJ9 ) NestedDocsProvider.childDocs always returns all results. ( https://hibernate.atlassian.net/browse/HSEARCH-3846?atlOrigin=eyJpIjoiMTQ5NmE0YWY0NDBhNDU3OGJlYTJjZjQyMDliYWMzYTciLCJwIjoiaiJ9 )

Change By: Waldemar Kłaczyński ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A77e50cac-bda3-4af4-9bb3-6461f4d10eea )

NestedDocsProvider.childDocs always returns all results. Regardless of the nested filter. Parent query works correctly, if the nested query has no results then the document is not returned. Nevertheless, the results that do not meet the filter condition are also taken for sorting.

{noformat}PredicateFinalStep filter = scope.predicate()
.nested().objectField( "nested" ).nest( (f) -> {
return f.match().field( "nested.active" ).matching( true );
} );

SearchQuery<DocumentReference> query = scope.query()
.where( f -> {
return f.bool().must( f.matchAll() )
.filter( filter );
} )
.sort( f -> f.field( "nested.additionalDoubleField" ).asc().multi().min() )
.toQuery();{noformat}

[https://github.com/hibernate/hibernate-search/pull/2224/commits/cba7041493eda3680fe00abfa107ba4af606496f#diff-74aab62c51304e2e914e81dd39c66236|https://github.com/hibernate/hibernate-search/pull/2224/commits/cba7041493eda3680fe00abfa107ba4af606496f#diff-74aab62c51304e2e914e81dd39c66236|smart-link]

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

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#100121- sha1:090dddf )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200301/01a7dae2/attachment.html 


More information about the hibernate-issues mailing list