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/solr/latest/indexing-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
FieldsModifier and TypeFieldDescriptionprotected org.apache.solr.common.params.SolrParamsprotected org.apache.solr.common.params.SolrParamsprotected org.apache.solr.common.params.SolrParams -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) voidvoidinit(org.apache.solr.common.util.NamedList<?> args)
-
Field Details
-
defaults
protected org.apache.solr.common.params.SolrParams defaults -
appends
protected org.apache.solr.common.params.SolrParams appends -
invariants
protected org.apache.solr.common.params.SolrParams invariants
-
-
Constructor Details
-
OpenNLPLangDetectUpdateProcessorFactory
public OpenNLPLangDetectUpdateProcessorFactory()
-
-
Method Details
-
init
public void init(org.apache.solr.common.util.NamedList<?> args) - Specified by:
initin interfaceNamedListInitializedPlugin
-
getInstance
public UpdateRequestProcessor getInstance(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next) - Specified by:
getInstancein classUpdateRequestProcessorFactory
-
inform
- Specified by:
informin interfaceSolrCoreAware
-