[hibernate-issues] [JIRA] (HSEARCH-3846) Sort by NestedDocsProvider.childDocs always returns all results.
Waldemar Kłaczyński (JIRA)
jira at hibernate.atlassian.net
Sun Mar 1 17:16:39 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=eyJpIjoiOTM5NzAxYWEwODVmNDg5MmIxN2QyZmM4OTA3MGUyODEiLCJwIjoiaiJ9 ) / Bug ( https://hibernate.atlassian.net/browse/HSEARCH-3846?atlOrigin=eyJpIjoiOTM5NzAxYWEwODVmNDg5MmIxN2QyZmM4OTA3MGUyODEiLCJwIjoiaiJ9 ) HSEARCH-3846 ( https://hibernate.atlassian.net/browse/HSEARCH-3846?atlOrigin=eyJpIjoiOTM5NzAxYWEwODVmNDg5MmIxN2QyZmM4OTA3MGUyODEiLCJwIjoiaiJ9 ) Sort by NestedDocsProvider.childDocs always returns all results. ( https://hibernate.atlassian.net/browse/HSEARCH-3846?atlOrigin=eyJpIjoiOTM5NzAxYWEwODVmNDg5MmIxN2QyZmM4OTA3MGUyODEiLCJwIjoiaiJ9 )
Change By: Waldemar Kłaczyński ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3A77e50cac-bda3-4af4-9bb3-6461f4d10eea )
Sort by NestedDocsProvider.childDocs always returns all results. The situation is not recommended. If the final results themselves do not contain elements contained in the filter, then they should not sort by these values. As a result, the sorted items do not match and the calculated values.
{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=eyJpIjoiOTM5NzAxYWEwODVmNDg5MmIxN2QyZmM4OTA3MGUyODEiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HSEARCH-3846#add-comment?atlOrigin=eyJpIjoiOTM5NzAxYWEwODVmNDg5MmIxN2QyZmM4OTA3MGUyODEiLCJwIjoiaiJ9 )
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/caf142c4/attachment.html
More information about the hibernate-issues
mailing list