1. UIMA Integration
You can use SOLR to integrate Apache's unstructured Information Management Architecture (UIMA). Uima lets you define your own analysis engine channel and incrementally add metadata to the document's annotations.
For more information about the SOLR Uima, refer to Https://wiki.apache.org/solr/SolrUIMA.
1.1 Configuring UIMA
SOLR Uima's updaterequestprocessor is a custom update request processor. Send them to the Uima pipeline and return the document with rich metadata. Follow the steps below to configure the Uima:
1. Solrconfig.xml, copy the/solr-4.x.y/dist/solr-uima-4.x.y.jar package and its contrib/uima/lib below the class library to the SOLR class library directory.
<dir= ".. /.. /contrib/uima/lib "/><dir=". /.. /dist/" regex=" Solr-uima-\d.*\.jar "/>
2.schema.xml, add the metadata field:
<Fieldname= "Language"type= "string"indexed= "true"stored= "true"Required= "false" /><Fieldname= "Concept"type= "string"indexed= "true"stored= "true"multivalued= "true"Required= "false" /><Fieldname= "sentence"type= "text"indexed= "true"stored= "true"multivalued= "true"Required= "false" />
3. Add the following fragment to the Solrconfig.xml:
<Updaterequestprocessorchainname= "Uima"> <Processorclass= "Org.apache.solr.uima.processor.UIMAUpdateRequestProcessorFactory"> <LSTname= "Uimaconfig"> <LSTname= "Runtimeparameters"> <Strname= "Keyword_apikey">Valid_alchemyapi_key</Str> <Strname= "Concept_apikey">Valid_alchemyapi_key</Str> <Strname= "Lang_apikey">Valid_alchemyapi_key</Str> <Strname= "Cat_apikey">Valid_alchemyapi_key</Str> <Strname= "Entities_apikey">Valid_alchemyapi_key</Str> <Strname= "Oc_licenseid">Valid_opencalais_key</Str> </LST> <Strname= "Analysisengine">/org/apache/uima/desc/overridingparamsextservicesae.xml</Str> <!--Set to True if the want to continue indexing even if text processing fails. Default is false. That's, Solr throws runtimeexception and never indexed documents entirely in your session. - <BOOLname= "Ignoreerrors">True</BOOL> <!--This is optional. It is used for logging when text processing fails. If Logfield is not specified, UniqueKey'll be used as Logfield. <str name= "Logfield" >id</str> - <LSTname= "Analyzefields"> <BOOLname= "Merge">False</BOOL> <arrname= "Fields"> <Str>Text</Str> </arr> </LST> <LSTname= "Fieldmappings"> <LSTname= "type"> <Strname= "Name">Org.apache.uima.alchemy.ts.concept.ConceptFS</Str> <LSTname= "Mapping"> <Strname= "feature">Text</Str> <Strname= "Field">Concept</Str> </LST> </LST> <LSTname= "type"> <Strname= "Name">Org.apache.uima.alchemy.ts.language.LanguageFS</Str> <LSTname= "Mapping"> <Strname= "feature">Language</Str> <Strname= "Field">Language</Str> </LST> </LST> <LSTname= "type"> <Strname= "Name">Org.apache.uima.SentenceAnnotation</Str> <LSTname= "Mapping"> <Strname= "feature">Coveredtext</Str> <Strname= "Field">Sentence</Str> </LST> </LST> </LST> </LST> </Processor> <Processorclass= "SOLR." Logupdateprocessorfactory " /> <Processorclass= "SOLR." Runupdateprocessorfactory " /></Updaterequestprocessorchain>
1.6.9 UIMA Integration