Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrade filter in schema.xml with solr.StandardFilterFactory from existing core on new server

I need to move a solr core running on 5.5.3 to new server, where I installed solr 8.1.1. Unfortunately the exixsting schema.xml uses several instances of

solr.StandardFilterFactory

that now has been removed and I don't know how to rewrite the schema without those.

When I try to add the core, the error

ERROR: Error CREATEing SolrCore 'core-test': Unable to create core [core-test] Caused by: solr.StandardFilterFactory

is displayed instead.

My actual code is

<analyzer type="index">
            <tokenizer class="solr.StandardTokenizerFactory"/>
            <filter class="solr.StandardFilterFactory"/>
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords_fr.txt"/>
            <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" splitOnNumerics="0"/>
            <filter class="solr.ASCIIFoldingFilterFactory"/>
            <filter class="solr.LowerCaseFilterFactory"/>
            <filter class="solr.SnowballPorterFilterFactory" language="French" protected="protwords_fr.txt" />
            <filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
        </analyzer>

I have searched the manuals, but they only say it has been removed https://github.com/apache/lucene-solr/blob/master/lucene/CHANGES.txt

like image 547
Lila Avatar asked Oct 21 '25 12:10

Lila


1 Answers

The StandardFilter hasn't done anything since 3.1, so you can safely remove it:

This filter is no longer operational in Solr when the luceneMatchVersion (in solrconfig.xml) is higher than "3.1".

It should not affect anything, except if you've explicitly used a luceneMatchVersion lower than 3.2.

Your stemmer probably does parts of what the Standard Filter did already - i.e. it removes plural 's.

If you still require some functionality from the old StandardFilter, you can drop the StandardTokenizer and use the Classic versions instead:

<tokenizer class="solr.ClassicTokenizerFactory"/>
<filter class="solr.ClassicFilterFactory"/>
like image 51
MatsLindh Avatar answered Oct 23 '25 09:10

MatsLindh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!