[prev in list] [next in list] [prev in thread] [next in thread]
List: lucene-user
Subject: Re: Indexing multiple keywords in one field?
From: Erik Hatcher <erik () ehatchersolutions ! com>
Date: 2005-05-31 9:22:58
Message-ID: 5676D972-9899-4A73-B4E7-75EB5FD8AF69 () ehatchersolutions ! com
[Download RAW message or body]
On May 31, 2005, at 4:06 AM, Paul Libbrecht wrote:
>
> Le 30 mai 05, à 22:13, Doug Hughes a écrit :
>
>> Ok, so more than one keyword can be stored in a keyword field.
>> Interesting!
>>
>
> Yes, yes, yes!! You can do:
>
> doc.add("link","xx");
> doc.add("link","yy");
Well, that's not quite correct API, but your point is accurate :)
> and matches will match any of them!
> I found this in the book and not in the javadoc and I'd recommed
> adding it in the javadoc of the add method, it's a non-obvious
> goodness which suits all forms of scalability!
Fields are made up of terms. A Field.Keyword makes a single term for
a field. Adding multiple fields with the same name works even if its
not Field.Keyword - it simply adds the term(s) to the field.
Good point about documentation - it would be worth noting this
explicitly.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic