I am using solr for searching. When i search a word contains uppercase letters from
description, its not showing any result. But it gives result for lowercase letters ..
Eg: If my query is q=description:* stack * , i will get the result . But if query is
q=description:* Stack * , it wont give any result evenif description contains that word
My schema contains :
<fieldType name="string" class="solr.TextField">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.ReversedWildcardFilterFactory" />
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.ASCIIFoldingFilterFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.ReversedWildcardFilterFactory" />
</analyzer>
</fieldType>
I want to search with upper case letters also..
Can someone help me ?
Have a look at the Solr wiki. It says:
Try querying with
debugQuery=onafter you’ve changed the schema to reflect the wiki instructions:As you can see, the
ReversedWildcardFilterFactorychanges your query even if it’s not in your query analyzer chain, with a fieldType like this:Furthermore, the
LowerCaseFilterFactoryis not fired for your query (theSis not lowercase in the parsed query). The same happens forASCIIFoldingFilterFactory.Have a look here to know more:
The easiest solution that comes in my mind is making your queries lowercase on client side, before sending them to Solr. You should also consider that the
ASCIIFoldingFilterFactoryis not fired either. Do you really need it?