lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shashi Kant <sk...@sloan.mit.edu>
Subject Re: "IN" Query for NumericFields
Date Thu, 10 Dec 2009 15:39:37 GMT
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.baeriswyl@comparis.ch> wrote:

> Hi,
>
> I do have some indices where I need to get results based on a fixed number
> list (not a range)
> Let's say I have a field named "CategoryID" and I now need all results
> where "CategoryID" is 1,3 or 7.
>
> In Lucene 2.4 I created a QueryParser which looked like: "CategoryID:(1 3
> 7)". But the Query Parser won't work with NumericFields...
>
> How can I achieve the same for NumericFields?
>
> Btw I'm using Lucene.net.
>
> Thanks for Help
> //Roman
>
> comparis.ch auf Twitter folgen: http://twitter.com/comparis
>
> Ein Freund auf Facebook werden: http://www.facebook.com/comparis.ch
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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