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 Ramana Jelda <ra...@ciao-group.com> on 2006/06/12 18:18:17 UTC

How can I tell Lucene to also use analyzer for Keyword fields

Hi,
It seems anaylzers are never get called for UnTokenized fields(Seems no luck
either using PerFieldAnalyzer).

What should I do, If I would like to use analyzer for Untokenized fields.
Lets say for Keyword or Unstored fields.

I basically would like to use lucene Sort functionality on UnTokenized
fields which needs some analyzation at indexing time.

Thanks in advance,
Regards,
Jelda


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


RE: How can I tell Lucene to also use analyzer for Keyword fields

Posted by Ramana Jelda <ra...@ciao-group.com>.
Thanks for your  replies.


> -----Original Message-----
> From: Chris Hostetter [mailto:hossman_lucene@fucit.org] 
> Sent: Tuesday, June 13, 2006 9:13 AM
> To: java-user@lucene.apache.org
> Subject: Re: How can I tell Lucene to also use analyzer for 
> Keyword fields
> 
> 
> : It seems anaylzers are never get called for UnTokenized 
> fields(Seems no luck
> : either using PerFieldAnalyzer).
> 
> The label "tokenized" is somewhat missleading .. it assumes 
> that your analyzer will do some tokenizing (which it doesn't 
> have to do in the case of the KeywordAnalyzer).  The best 
> thing to do is equate "tokenize == analyzed" in your mind 
> when reading any of the Field methods/constants.
> 
> Which makes this question kind of meaningless..
> 
> : What should I do, If I would like to use analyzer for 
> Untokenized fields.
> : Lets say for Keyword or Unstored fields.
> :
> : I basically would like to use lucene Sort functionality on 
> UnTokenized
> : fields which needs some analyzation at indexing time.
> 
> Index your fields as "TOKENIZED" but choise an analyzer that 
> doesn't do any tokenizing (something that uses the KeywordTokenizer)
> 
> 
> 
> 
> -Hoss
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: How can I tell Lucene to also use analyzer for Keyword fields

Posted by Chris Hostetter <ho...@fucit.org>.
: It seems anaylzers are never get called for UnTokenized fields(Seems no luck
: either using PerFieldAnalyzer).

The label "tokenized" is somewhat missleading .. it assumes that your
analyzer will do some tokenizing (which it doesn't have to do in the case
of the KeywordAnalyzer).  The best thing to do is equate "tokenize ==
analyzed" in your mind when reading any of the Field methods/constants.

Which makes this question kind of meaningless..

: What should I do, If I would like to use analyzer for Untokenized fields.
: Lets say for Keyword or Unstored fields.
:
: I basically would like to use lucene Sort functionality on UnTokenized
: fields which needs some analyzation at indexing time.

Index your fields as "TOKENIZED" but choise an analyzer that doesn't do
any tokenizing (something that uses the KeywordTokenizer)




-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org