Hi Chris,
Are you been able to get success to integrate the UIMA in SOLR.

I too  tried to integrate Uima in Solr by following the instructions
provided in README i.e. the following four steps:

Step1. I set <lib/> tags in solrconfig.xml appropriately to point the jar
files.

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

Step2. modified my "schema.xml" adding the fields I wanted to  hold metadata
specifying proper values for type, indexed, stored and multiValued options
as follows:

    <field name="language" type="string" indexed="true" stored="true"
required="false"/>
  <field name="concept" type="string" indexed="true" stored="true"
multiValued="true" required="false"/>
  <field name="sentence" type="text" indexed="true" stored="true"
multiValued="true" required="false" />

Step3. modified my solrconfig.xml adding the following snippet:

  <updateRequestProcessorChain name="uima">
    <processor
class="org.apache.solr.uima.processor.UIMAUpdateRequestProcessorFactory">
      <lst name="uimaConfig">
        <lst name="runtimeParameters">
          <str name="keyword_apikey">VALID_ALCHEMYAPI_KEY</str>
          <str name="concept_apikey">VALID_ALCHEMYAPI_KEY</str>
          <str name="lang_apikey">VALID_ALCHEMYAPI_KEY</str>
          <str name="cat_apikey">VALID_ALCHEMYAPI_KEY</str>
          <str name="entities_apikey">VALID_ALCHEMYAPI_KEY</str>
          <str name="oc_licenseID">VALID_OPENCALAIS_KEY</str>
        </lst>
        <str
name="analysisEngine">/org/apache/uima/desc/OverridingParamsExtServicesAE.xml</str>
        
        <bool name="ignoreErrors">true</bool>
        
        <lst name="analyzeFields">
          <bool name="merge">false</bool>
          <arr name="fields">
            <str>text</str>
          </arr>
        </lst>
        <lst name="fieldMappings">
          <lst name="type">
            <str
name="name">org.apache.uima.alchemy.ts.concept.ConceptFS</str>
            <lst name="mapping">
              <str name="feature">text</str>
              <str name="field">concept</str>
            </lst>
          </lst>
          <lst name="type">
            <str
name="name">org.apache.uima.alchemy.ts.language.LanguageFS</str>
            <lst name="mapping">
              <str name="feature">language</str>
              <str name="field">language</str>
            </lst>
          </lst>
          <lst name="type">
            <str name="name">org.apache.uima.SentenceAnnotation</str>
            <lst name="mapping">
              <str name="feature">coveredText</str>
              <str name="field">sentence</str>
            </lst>
          </lst>
        </lst>
      </lst>
    </processor>
    <processor class="solr.LogUpdateProcessorFactory" />
    <processor class="solr.RunUpdateProcessorFactory" />
  </updateRequestProcessorChain>

Step 4: and finally created a new UpdateRequestHandler with the following:
  <requestHandler name="/update" class="solr.XmlUpdateRequestHandler">
    <lst name="defaults">
      <str name="update.processor">uima</str>
    </lst>


Further I  indexed a word file called text.docx using the following command: 

curl
"http://localhost:8983/solr/update/extract?literal.id=doc1&uprefix=attr_&fmap.content=attr_content&commit=true";
-F "myfile=@UIMA_sample_test.docx"

When I searched the file I am not able to see the additional UIMA fields.

Can you please help if you been able to solve the problem.


With Regds & Thanks
Divakar

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Solr-with-UIMA-tp3863324p3923443.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to