I'm using solr's faceting and i've run into a problem that i was hoping i could get around using filters.
Basically some times a town name will come through to SOLR as
"CAMBRIDGE"
and sometime's it will come through as
"Cambridge"
I wanted to use a filter in Solr to stop the SCREAMING CAPS version of the town name. It seems there is a fitler to make all the text lower case.
<!-- A text field that only sorts out casing for faceting -->
<fieldType name="text_facet" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
I was wondering if anyone knew of a filter which will Ignore the First character of a word and apply lowercase to the rest of the characters. E.g.
- CAMBRIDGE >> Cambridge
- KingsTON Upon HULL >> Kingston Upon Hull
etc
Alternatively if it's easy to write your own filters.. some help on how to do that would be appreciated.. I'm not a Java person..
Thanks