I'm trying to sort a solr request by a field that ignores stop words, but can't seem to find a way to do this. For example, I want the results to be sorted as follows:
Is it possible? Right now, the field type is defined as follows:
<fieldType name="alphaOnlySort" class="solr.TextField" sortMissingLast="true" omitNorms="true">
<analyzer>
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory" />
<filter class="solr.TrimFilterFactory" />
<filter class="solr.StopFilterFactory" words="stopwords.txt" ignoreCase="true"/>
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
<filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])" replacement="" replace="all" />
</analyzer>
</fieldType>
And the field is added as:
<field name="title" type="alphaOnlySort" indexed="true" stored="false"/>
It seems someone else should have done this? Or sorting without stopwatch no no?
source
share