Discussion:
Language Detection in SOLR 3.5
Ankita Patil
2011-12-08 12:34:36 UTC
Permalink
Hi,
I tried to implement language detection in SOLR 3.5.

I added the processor class for langDetect in solrconfig.xml :

<updateRequestProcessorChain name="langid">
<processor
class="org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory">
<str name="langid.fl">cContent</str>
<str name="langid.langField">language</str>
<str name="langid.fallback">en</str>
</processor>
<processor class="solr.LogUpdateProcessorFactory" />
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>

<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" >
<lst name="defaults">
<str name="update.chain">langid</str>
</lst>
</requestHandler>

I declared the filed "language" in the schema as the output field for the
detected language code :

the field declaration : <field name="language" type="string"
indexed="true" stored="true" multiValued="false"/>

Now when i start my solr it gives an exception :

org.apache.solr.common.SolrException: Error loading class
'org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory'
Caused by: java.lang.ClassNotFoundException:
org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory

Is there anything that I am doing wrong?

Thanks in advance

Ankita
O. Klein
2011-12-08 12:50:17 UTC
Permalink
Did you also install apache-solr-langid-4.0.jar ?

And the jars in contrib/langid/lib ?

--
View this message in context: http://lucene.472066.n3.nabble.com/Language-Detection-in-SOLR-3-5-tp3570177p3570202.html
Sent from the Solr - User mailing list archive at Nabble.com.
Ankita Patil
2011-12-08 13:03:53 UTC
Permalink
I have apache-solr-langid-3.5.jar and also the jars in contrib/langid/lib

Ankita
Post by O. Klein
Did you also install apache-solr-langid-4.0.jar ?
And the jars in contrib/langid/lib ?
--
http://lucene.472066.n3.nabble.com/Language-Detection-in-SOLR-3-5-tp3570177p3570202.html
Sent from the Solr - User mailing list archive at Nabble.com.
Koji Sekiguchi
2011-12-08 15:51:10 UTC
Permalink
Post by Ankita Patil
org.apache.solr.common.SolrException: Error loading class
'org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory'
org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessorFactory
Ankita,

Are you sure that you set classpath for the lang detect in solrconfig.xml?

<lib dir="../../contrib/langid/lib/" />
<lib dir="../../dist/" regex="apache-solr-langid-\d.*\.jar" />

koji
--
Check out "Query Log Visualizer" for Apache Solr
http://www.rondhuit-demo.com/loganalyzer/loganalyzer.html
http://www.rondhuit.com/en/
Loading...