lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thturk <>
Subject Create Best Query For My Case
Date Mon, 27 Aug 2018 10:20:32 GMT
Hey i am trying to create some queries which should work like "where .....
and .... and" in sql. 
i have tried boolQuery for that purpose eg;

*boolQueryBuilder.add(new BooleanClause(new FuzzyQuery(new Term(fieldCity,
city), 0), Occur.FILTER));
boolQueryBuilder.add(new BooleanClause(new WildcardQuery(new Term(fieldText,
str)), Occur.SHOULD));
boolQueryBuilder.add(new FuzzyQuery(new Term(fieldText, strTemp), fuzzy),
boolQueryBuilder.add(new FuzzyQuery(new Term(fieldText, mergedKeyword),
fuzzy), Occur.SHOULD);*

These are one of  my query generator builders element. But problem is its
not working like "AND" operation "FILTER" or "MUST" return all values with
given field when "SHOULD" queries  not match with any result.

I want to have speed return so i want to have less result for each search.
Can someone give me advices about my problem.

Have nice work.

Sent from:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message