The other week I posted a question about removing punctuation from solr search in Drupal. That was using Solr 4. However, since then the development I am doing has changed from solr 4 to solr 5, and now I am having the same problem but the fix at Can't remove punctuation in Solr no longer works. This causes problems when sorting by titles since a lot of content titles have quotes around.
<field name="label" type="text" indexed="true" stored="true" termVectors="true" omitNorms="true"/>
<fieldType name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<charFilter class="solr.MappingCharFilterFactory" mapping="mapping-ISOLatin1Accent.txt"/>
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<filter class="solr.StopFilterFactory"
ignoreCase="true"
words="stopwords.txt"
/>
<filter class="solr.WordDelimiterFilterFactory"
protected="protwords.txt"
generateWordParts="1"
generateNumberParts="1"
catenateWords="1"
catenateNumbers="1"
catenateAll="0"
splitOnCaseChange="0"
preserveOriginal="1"/>
<filter class="solr.LengthFilterFactory" min="2" max="100" />
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.SnowballPorterFilterFactory" language="English" protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldType>
I've tried adding the following rules but apostrophes and quotation marks stay there stubbornly and interfere when sorting by titles, putting anything with quotes at the beginning first on the list.
<charFilter class="solr.HTMLStripCharFilterFactory" />
<filter class="solr.ApostropheFilterFactory"/>
<filter class="solr.PatternReplaceFilterFactory"
pattern="^\p{Punct}*(.*?)\p{Punct}*$"
replacement="$1"/>