Hello all,
I am facing problem to integrate the UIMA in SOLR. 

I followed the following steps, provided in README file shipped along with
Uima to integrate it in Solr 

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" default="true">
    <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?fmap.content=content&literal.id=doc47&commit=true";
-F file=@test.docx

When I searched the same document with
"http://localhost:8983/solr/select?q=id:doc47"; command, got the following
result i.e. not getting the additional UIMA fields in the response. 

<result name="response" numFound="1" start="0">
  <doc>
     <str name="author">divakar</str>
     <arr name="content_type">
        <str>
          
application/vnd.openxmlformats-officedocument.wordprocessingml.document 
        </str>
     </arr>
     <str name="id">doc47</str>
     <date name="last_modified">2012-04-18T14:19:00Z</date>
  </doc>
</result>


Can anyone help to fix this problem.

With Regds & Thanks 
Divakar


--
View this message in context: 
http://lucene.472066.n3.nabble.com/Facing-problem-to-integrate-UIMA-in-SOLR-tp3932008p3932008.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to