Rob Outar wrote:

What happens if I add the same name/value pair to a Lucene Document?  Does
it override it?  Does it append it so you have duplicates?

I believe it 'appends' in the sense that if you add 2 fields with the same
name then the Document has the union of the content of both fields
added, and then you can search on anything in either or both of the field
values you added.

One use case is if you're indexing html and you want a field for the title, a field
for the body, and a easy way for users to refer to both the field and the body
in a query.


So when you add a Field for the title named "title",
you also add one with a name like "contents", and then
you add a field for the body named "body", and then you
pass the same data and add another field named "contents".
Then, voilla, a search on contents:foo returns matches against
the title and the body.


Let me know,



Rob



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