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
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
>
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
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
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
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