Reputation: 4655
I'm using a query schema which need to let abc
match Abc
and 400
match 400
(user name match).
But I found when I use LowerCaseFilterFactory
, It not return any result when I query 400
.
I digg into the source code, and found LowerCaseTokenizerFactory
use LowerCaseTokenizer
which extends LetterTokenizer
, and it filter all the numbers.
How should I fix this?
Upvotes: 1
Views: 719
Reputation: 33341
You are right that LowerCaseTokenizer
will remove all non-letters. It would very useful (as far as providing a meaningful answer) to see your schema, as I don't believe just using the lowercase filter factory should generate a Tokenizer
of any kind.
At any rate, though, there are plenty of other options for tokenizers. Both Standard
or Classic
might suit your needs better.
Something along the line of:
<analyzer>
<tokenizer class="solr.StandardTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
Might do well for you.
Upvotes: 2