Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate Search (
https://hibernate.atlassian.net/browse/HSEARCH?atlOrigin=eyJpIjoiMjYwNzUy...
) / Improvement (
https://hibernate.atlassian.net/browse/HSEARCH-4679?atlOrigin=eyJpIjoiMjY...
) HSEARCH-4679 (
https://hibernate.atlassian.net/browse/HSEARCH-4679?atlOrigin=eyJpIjoiMjY...
) Automatically simplify and/or predicates with a single clause (
https://hibernate.atlassian.net/browse/HSEARCH-4679?atlOrigin=eyJpIjoiMjY...
)
Issue Type: Improvement Assignee: Unassigned Created: 24/Aug/2022 07:42 AM Fix Versions:
6.2-backlog Priority: Major Reporter: Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
Follows up on
https://hibernate.atlassian.net/browse/HSEARCH-4601 (
https://hibernate.atlassian.net/browse/HSEARCH-4601 ) ,
https://hibernate.atlassian.net/browse/HSEARCH-4676 (
https://hibernate.atlassian.net/browse/HSEARCH-4676 )
There are some cases where one might be forced to use a “simple boolean predicate” due to
the DSL syntax, but where they don’t really need it and end up adding only one clause. In
those cases, it would be nice to automatically replace the boolean with its only clause,
be it just to simplify debugging of the JSON sent to Elasticsearch.
One example is when using a nested predicate and needing the full-featured bool
predicate:
.where( f -> f.nested( "lineItems" )
.add( f.bool()
.must( f.range().field( "lineItems.amount" )
.between( new BigDecimal( "7.0" ),
new BigDecimal( "9.0" ) ) )
.must( f.match().field( "lineItems.category"
)
.matching( "BOOK" )
// Ignore the score for this particular clause
.filter( f.match().field( "lineItems.type" )
.matching( "CREDIT" )
) ))
(
https://hibernate.atlassian.net/browse/HSEARCH-4679#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-4679#add-comment?atlOrigin...
)
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....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100206- sha1:1c596f6 )