lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Noll <>
Subject Re: Is it possible to add multiple keywords to a single field from one doc?
Date Mon, 26 May 2008 04:24:19 GMT
On Monday 26 May 2008 02:25:40 Tom Conlon wrote:
> Hi Mark,
> For example:
> you have a content field (default) and you also have an 'attributes'
> field.
> I'd like to add multiple attributes for a given document rather than
> just one value and be able to somehow search on the attributes.
> Ie. Similar to a One-to-many DB relationship between document table(pk
> docid) and docattribute table (pk docid,attributeid)

Try adding two Field objects with the same name to the same Document, it's 
probably the easiest and most intuitive way to do what you want.

Not sure if there is a drawback to doing it this way, vs. using a single field 
and breaking on the whitespace.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message