You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by ba...@oracle.com on 2018/07/18 19:21:32 UTC

Lucene BooleanQuery with some TermQuery's having BooleanClause.Occur set MUST for all

Hi,-

  i have an indexed field having "$word1 word2" and i want to find the 
docs having these two words first in my first query.

  i have another indexed field but i am not searching on that second 
field for this first query

which is BooleanQuery with two TermQuery's having BooleanClause.Occur 
set MUST for each term.

i tokenize the input lets say it has 2 words and i placed each tokenized 
word into corresponding TermQuery.

My index uses standardtokenizer and the following due to my second query 
requirements:

StandardFilter
LowerCaseFilter
ASCIIFoldingFilter
StopFilter


i get zero hits for the first query with BooleanQuery . what is missing 
in my first query (BooleanQuery) so that it cant find any hits?

Best regards


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