lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nabib El-Rahman <nabi...@gmail.com>
Subject Not query help.
Date Wed, 24 Nov 2010 01:04:44 GMT
Hi,

What I need is a Not TermQuery. I did not see one in the API, so I did the
following:

Query query = new BooleanQuery(new BooleanClause(new
TermQuery(..), BooleanClause.Occur.MUST_NOT)));

This did not produce the correct search result. Does anyone have any idea on
how to accomplish this?

And is here such a thing as NotTermQuery(..) ?

Thanks in advance!

-Nabib

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message