Waldemar Kłaczyński (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HSEARCH-3862 (
https://hibernate.atlassian.net/browse/HSEARCH-3862?atlOrigin=eyJpIjoiMDF...
)
Re: It is not possible to define "@FullTextFilterDef" filters. (
https://hibernate.atlassian.net/browse/HSEARCH-3862?atlOrigin=eyJpIjoiMDF...
)
I think that it would be easy to open such functionality is building a filter factory as a
fragment of a predicate.
public static class TestFilterFactory implements FilterFactory {
@Override
public SearchPredicate create(FilterFactoryContext ctx) {
SearchPredicate filter = ctx.predicate()
.match().field( "fieldName" )
.matching( ctx.param( "match" ) )
.toPredicate();
return filter;
}
}
Such a filter could be, like in the previous version, declared using annotations.
@FullTextFilter(name= "test_filter" , factory = @FilterFactoryRef(type =
TestFilterFactory.class))
public class Assortment implements Serializable {
....
Later, you could use such a filter when creating a query.
scope.query()
.where( f -> {
return f.bool()
.filter( f.def( "match_fieldName" ).param( "match" , true ) );
}).toQuery()
I think that this functionality would be very simple to implement in the current code.
(
https://hibernate.atlassian.net/browse/HSEARCH-3862#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-3862#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:545f4ab )