Waldemar Kłaczyński (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on HSEARCH-3845 (
https://hibernate.atlassian.net/browse/HSEARCH-3845?atlOrigin=eyJpIjoiOWQ...
)
Re: Ineffective search for the "simpleQueryString" predicate. (
https://hibernate.atlassian.net/browse/HSEARCH-3845?atlOrigin=eyJpIjoiOWQ...
)
Alternate query works fine. The problem is that it doesn't complete all the queries as
per the documentation.
Does not return results for:
select = scope.predicate().simpleQueryString()
.field( "shoppingName" )
.matching(“rob*“)
.defaultOperator(BooleanOperator.AND);
SearchQuery<Assortment> query = session
.search(scope)
.where((f) -> select).toQuery();
But it works well for:
Map< String , Float > weights = new LinkedHashMap<>();
weights.put( "shoppingName" , 1f);
SimpleQueryParser parser = new SimpleQueryParser( new StandardAnalyzer(), weights,
-1);
parser.setDefaultOperator(BooleanClause.Occur.MUST);
Query lcq = parser.parse("rob*);
SearchQuery<Assortment> query = session.search(scope)
.extension(LuceneExtension.get())
.where((f) -> f.fromLuceneQuery(lcq))
.toQuery();
It doesn't seem to make sense to use FieldContextSimpleQueryParser and only introduces
errors.
(
https://hibernate.atlassian.net/browse/HSEARCH-3845#add-comment?atlOrigin...
) Add Comment (
https://hibernate.atlassian.net/browse/HSEARCH-3845#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:0fbe7c1 )