Okay, this is easy then. As long as you are using an analyzer that breaks up terms when it encounters a space, you just add all of the attributes as a single Field entry to the document (attribute field="big large black bulky"), with each attribute separated by a space. This will result in a hit on that document for every search query that searches the attribute field and that contains a term thats listed in the space separated attribute field.

- Mark

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)

TIA,
Tom
-----Original Message-----
From: Mark Miller [mailto:[EMAIL PROTECTED] Sent: 24 May 2008 16:53
To: java-user@lucene.apache.org
Subject: Re: Is it possible to add multiple keywords to a single field
from one doc?

Tom Conlon wrote:
Hi,

I haven't been able to find the answer to this question easily so any help would be appreciated.

Thanks,
Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Could you elaborate a bit Tom? Your question is not very clear. If by
keywords, you mean terms, and instead of from one doc, you mean to one
doc, then the answer is yes. But as phrased, I am not sure what the
question is.

- Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to