lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: arrays of values in a field
Date Tue, 27 Jan 2004 19:34:21 GMT
On Jan 27, 2004, at 2:27 PM, Gabe wrote:
> If I have a group of documents and I want to filter on
> a category, it is fairly straightforward. I just
> create a Field that contains the category and filter
> on it.
>
> However, what if I want the field "category" to have
> multiple possible values? Is there a known best way to
> filter on that?
>
> I imagine it is possible to "hack" it by, say,
> creating a field with value:
> |category1|category2|category3| etc.
>
> And then query "|category1|"
>
> I was wondering if there was a better way.

Simply add multiple (probably Keyword) fields with the same name.  
Lucene supports this nicely.

	Erik



---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message