Package org.apache.solr.update.processor
Class OpenNLPLangDetectUpdateProcessorFactory
- java.lang.Object
-
- org.apache.solr.update.processor.UpdateRequestProcessorFactory
-
- org.apache.solr.update.processor.OpenNLPLangDetectUpdateProcessorFactory
-
- All Implemented Interfaces:
NamedListInitializedPlugin
,SolrCoreAware
public class OpenNLPLangDetectUpdateProcessorFactory extends UpdateRequestProcessorFactory implements SolrCoreAware
Identifies the language of a set of input fields using Apache OpenNLP.The UpdateProcessorChain config entry can take a number of parameters which may also be passed as HTTP parameters on the update request and override the defaults. Here is the simplest processor config possible:
<processor class="org.apache.solr.update.processor.OpenNLPLangDetectUpdateProcessorFactory"> <str name="langid.fl">title,text</str> <str name="langid.langField">language_s</str> <str name="langid.model">langdetect-183.bin</str> </processor>
See https://solr.apache.org/guide/language-detection.html#configuring-opennlp-language-detection- Since:
- 7.3.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.update.processor.UpdateRequestProcessorFactory
UpdateRequestProcessorFactory.RunAlways
-
-
Field Summary
Fields Modifier and Type Field Description protected SolrParams
appends
protected SolrParams
defaults
protected SolrParams
invariants
-
Constructor Summary
Constructors Constructor Description OpenNLPLangDetectUpdateProcessorFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UpdateRequestProcessor
getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)
void
inform(SolrCore core)
void
init(NamedList<?> args)
-
-
-
Field Detail
-
defaults
protected SolrParams defaults
-
appends
protected SolrParams appends
-
invariants
protected SolrParams invariants
-
-
Method Detail
-
init
public void init(NamedList<?> args)
- Specified by:
init
in interfaceNamedListInitializedPlugin
-
getInstance
public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next)
- Specified by:
getInstance
in classUpdateRequestProcessorFactory
-
inform
public void inform(SolrCore core)
- Specified by:
inform
in interfaceSolrCoreAware
-
-