Simon
Simon

Reputation: 1117

Solr and Morfologik - how to install a patch?

I installed Solr (5.2.1) from here http://lucene.apache.org/solr/mirrors-solr-latest-redir.html.

I created a new filed type in the schema.xml sile:

<fieldType name="text_pl" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true">
        <analyzer type="index">
            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
            <filter class="solr.SynonymFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pl.txt" />
            <filter class="solr.LowerCaseFilterFactory"/>
            <filter class="solr.MorfologikFilterFactory" dictionary="MORFOLOGIK" />
        </analyzer>
        <analyzer type="query">
            <tokenizer class="solr.WhitespaceTokenizerFactory"/>
            <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
            <filter class="solr.StopFilterFactory" ignoreCase="true" words="lang/stopwords_pl.txt" />
            <filter class="solr.LowerCaseFilterFactory"/>
            <filter class="solr.MorfologikFilterFactory" dictionary="MORFOLOGIK" />
        </analyzer>
    </fieldType>

But there is a problem when I'm loading this core:

org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core new_core: Plugin init failure for [schema.xml] fieldType "text_pl": Plugin init failure for [schema.xml] analyzer/filter: Error instantiating class: 'org.apache.lucene.analysis.morfologik.MorfologikFilterFactory'.

I found this issue: https://issues.apache.org/jira/browse/SOLR-4007. I think it can be helpful, but I don't know how to update my Solr to fix this problem.

Any advice?

EDIT: Here https://issues.apache.org/jira/browse/SOLR-4007 is an information that fixed version is 4.1 [12321141]. But how can I install it?

Upvotes: 1

Views: 1391

Answers (3)

favex
favex

Reputation: 1

Try add path to your solr while you starting it, e.g: bin/solr -f -Dopt.dir=/solr-5.2.1/

Upvotes: 0

balint
balint

Reputation: 3431

I'm using SOLR 5.5.0, but got the same error.

If you go to the Logging menu in the SOLR webapp, you can find this error in red. If you click on the error, it will show the full exception - you will find the exact error description at the end. (For me it was using the old dictonary-resource attribute.)

I guess the error here is that you can omit the dictionary attribute as per the source code, it is possible, that it can't find the named dictionary.

Anyway upgrade to the latest SOLR version, if possible, and try again.

Upvotes: 0

Abhijit Bashetti
Abhijit Bashetti

Reputation: 8668

Download the lucene-analyzers-morfologik-4.0.0.jar from

http://www.java2s.com/Code/Jar/l/Downloadluceneanalyzersmorfologik400jar.htm

and add the same in lib folder at path (Considering your are using solr-5.0.0)

../solr-5.0.0/server/solr-webapp/webapp/WEB-INF/lib.

Restart the server...and then check

Upvotes: 1

Related Questions