Re: "IN" Query for NumericFields

2009-12-10 Thread Matthew Hall
ember 10, 2009 7:03 PM To: java-user@lucene.apache.org Subject: RE: "IN" Query for NumericFields Cannot be :-) Is the precstep identical? - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de -Original Message- From: comp

RE: "IN" Query for NumericFields

2009-12-10 Thread Uwe Schindler
age- > From: Uwe Schindler [mailto:u...@thetaphi.de] > Sent: Thursday, December 10, 2009 7:03 PM > To: java-user@lucene.apache.org > Subject: RE: "IN" Query for NumericFields > > Cannot be :-) Is the precstep identical? > > - > Uwe Schindler >

RE: "IN" Query for NumericFields

2009-12-10 Thread Uwe Schindler
9 5:24 PM > To: 'java-user@lucene.apache.org' > Subject: RE: "IN" Query for NumericFields > > I tried > > Query q = new BooleanQuery(); > ((BooleanQuery)q).Add(NumericRangeQuery.NewLongRange("CategoryID", 1, 1, > true, true), BooleanClause.Occu

RE: "IN" Query for NumericFields

2009-12-10 Thread comparis . ch - Roman Baeriswyl
ember 2009 16:40 To: java-user@lucene.apache.org Subject: Re: "IN" Query for NumericFields Have you looked at BooleanQuery? Create individual TermQuery and OR them using BooleanQuery. On Thu, Dec 10, 2009 at 10:34 AM, comparis.ch - Roman Baeriswyl < roman.baeris...@comparis.ch> wr

RE: "IN" Query for NumericFields

2009-12-10 Thread Uwe Schindler
You can override QP's newTermQuery method. Look into the list archives and search for both keywords. There it is also explained how to use NumericRangeQuery with QP. The ideal solution to hit exact terms are to use NumericRangeQuery with upper lower bound indentical and inclusive. Uwe - Uwe

Re: "IN" Query for NumericFields

2009-12-10 Thread Shashi Kant
Have you looked at BooleanQuery? Create individual TermQuery and OR them using BooleanQuery. On Thu, Dec 10, 2009 at 10:34 AM, comparis.ch - Roman Baeriswyl < roman.baeris...@comparis.ch> wrote: > Hi, > > I do have some indices where I need to get results based on a fixed number > list (not a ran