You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Walter Underwood <wu...@netflix.com> on 2009/03/30 21:08:09 UTC
Lower-cased string fieldtype?
I need a lower-cased string fieldtype (to use with the ElevationComponent),
but I'm temporarily stuck. The LowerCaseFilter needs a tokenizer, but I
don't want to tokenize. What am I missing?
wunder
Re: Lower-cased string fieldtype?
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Tue, Mar 31, 2009 at 12:38 AM, Walter Underwood
<wu...@netflix.com>wrote:
> I need a lower-cased string fieldtype (to use with the ElevationComponent),
> but I'm temporarily stuck. The LowerCaseFilter needs a tokenizer, but I
> don't want to tokenize. What am I missing?
>
KeywordTokenizer can help.
--
Regards,
Shalin Shekhar Mangar.
Re: Lower-cased string fieldtype?
Posted by Walter Underwood <wu...@netflix.com>.
Thanks! I posted, went to get a sandwich, and came back to see two
answers. The change works, and I can get the fix into production today.
This list is magic.
wunder
On 3/30/09 12:13 PM, "Vauthrin, Laurent" <La...@disney.com>
wrote:
> I'm not sure if I did this the right way but here's what I ended up
> using:
>
> <fieldType name="string" class="solr.TextField" sortMissingLast="true"
> omitNorms="true">
> <analyzer>
> <tokenizer class="solr.KeywordTokenizerFactory"/>
> <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
> </fieldType>
>
> According to the comments:
>
> <!-- KeywordTokenizer does no actual tokenizing, so the entire input
> string is preserved as a single token -->
>
> Note: I had to use the TextField instead of StrField.
>
> -----Original Message-----
> From:
> solr-user-return-20238-Laurent.Vauthrin=disney.com@lucene.apache.org
> [mailto:solr-user-return-20238-Laurent.Vauthrin=disney.com@lucene.apache
> .org] On Behalf Of Walter Underwood
> Sent: Monday, March 30, 2009 12:08 PM
> To: solr-user@lucene.apache.org
> Subject: Lower-cased string fieldtype?
>
> I need a lower-cased string fieldtype (to use with the
> ElevationComponent),
> but I'm temporarily stuck. The LowerCaseFilter needs a tokenizer, but I
> don't want to tokenize. What am I missing?
>
> wunder
>
RE: Lower-cased string fieldtype?
Posted by "Vauthrin, Laurent" <La...@disney.com>.
I'm not sure if I did this the right way but here's what I ended up
using:
<fieldType name="string" class="solr.TextField" sortMissingLast="true"
omitNorms="true">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
According to the comments:
<!-- KeywordTokenizer does no actual tokenizing, so the entire input
string is preserved as a single token -->
Note: I had to use the TextField instead of StrField.
-----Original Message-----
From:
solr-user-return-20238-Laurent.Vauthrin=disney.com@lucene.apache.org
[mailto:solr-user-return-20238-Laurent.Vauthrin=disney.com@lucene.apache
.org] On Behalf Of Walter Underwood
Sent: Monday, March 30, 2009 12:08 PM
To: solr-user@lucene.apache.org
Subject: Lower-cased string fieldtype?
I need a lower-cased string fieldtype (to use with the
ElevationComponent),
but I'm temporarily stuck. The LowerCaseFilter needs a tokenizer, but I
don't want to tokenize. What am I missing?
wunder