RE: Not query help.

2010-11-23 Thread Uwe Schindler
Hi, Do it like that: BooleanQuery bq = new BooleanQuery(); bq.add(new MatchAllDocsQuery(), BooleanClause.Occur.MUST); bq.add(new TermQuery(..), BooleanClause.Occur.MUST_NOT); Uwe - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -Orig

Re: Not query help.

2010-11-23 Thread Mark Kristensson
I've had to deal with exactly this same scenario and, from what I know, there is no equivalent in Lucene to a SQL != kind of query. So, you have to have some way to select "everything" (whatever that means in your scenario) and then remove the stuff that you don't want (the NOT portion). For my app