Yoann Rodière (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HSEARCH-3325 (
https://hibernate.atlassian.net/browse/HSEARCH-3325?atlOrigin=eyJpIjoiODE...
)
Re: Search 6 groundwork - Restore support for full-text filters (
https://hibernate.atlassian.net/browse/HSEARCH-3325?atlOrigin=eyJpIjoiODE...
)
Hello Waldemar Kłaczyński (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
).
Your design submitted on HSEARCH-3862 (
https://hibernate.atlassian.net/browse/HSEARCH-3862 ) Closed seems sound, but there are a
few details to discuss. If you intend to submit a pull request, please hold until we agree
on those details.
First, I'm a bit sceptical as to the usefulness of that feature now that we allow
predicates to be defined as lambdas.
With the * *current API* *, you could do this:
public static class TestFilter {
public static SearchPredicate filter(SearchPredicateFactory f, boolean match) {
f.filter( f -> f..match().field( "fieldName" )
.matching( match )
.toPredicate;
}
}
scope.query()
.where( f -> f.bool()
.filter( TestFilter.filter( f, true ) )
.must( ... )
)
.toQuery()
This achieves the same result as your original proposal, without requiring any additional
API, and guarantees type safety for the match param. Could you point out what the
disadvantages of this solution are?
(
https://hibernate.atlassian.net/browse/HSEARCH-3325#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-3325#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#100121- sha1:ecfcbe7 )