lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thturk <tahatur...@hotmail.com>
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),
Occur.SHOULD);
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: http://lucene.472066.n3.nabble.com/Lucene-Java-Users-f532864.html

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message