You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Ryan Clifton <rc...@cj.com> on 2003/07/09 21:31:13 UTC
Adding to the same Keyword field
The Lucene API docs say that you can add to the same Field name and the text will be appended into the field. If I Add multiple times to the same Field name with a Field.Keyword type, will it make one big Keyword or multiple smaller Keywords in the same field?
Basically, I want to add all the href links on a page into one Field, but I don't want them to be tokenized (Keywords).
thx.
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org
Re: Adding to the same Keyword field
Posted by Erik Hatcher <li...@ehatchersolutions.com>.
It will make multiple "tokens" within the same field.... just as if you
had used a tokenized field with all the values (and your analyzer split
them in the manner you're adding them). Does that make sense?
In other words, adding keywords "foo" and "bar" is the same as using a
text field as "foo bar" and using the WhitespaceAnalyzer.
If you want to use a query like a TermQuery on
"http://jakarta.apache.org" then indexing multiple Keyword's with the
same field name is what you're after.
Erik
On Wednesday, July 9, 2003, at 12:31 PM, Ryan Clifton wrote:
> The Lucene API docs say that you can add to the same Field name and
> the text will be appended into the field. If I Add multiple times to
> the same Field name with a Field.Keyword type, will it make one big
> Keyword or multiple smaller Keywords in the same field?
>
> Basically, I want to add all the href links on a page into one Field,
> but I don't want them to be tokenized (Keywords).
>
> thx.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org