I followed these steps but was getting warnings 

Step 1:Setting <lib/> tags in solrconfig.xml appropriately to point those
jar files
  <lib dir="${solr.install.dir:../../../..}/contrib/uima/lib"
regex=".*\.jar" />
  <lib dir="${solr.install.dir:../../../..}/contrib/uima/lucene-libs"
regex=".*\.jar" />  
  <lib dir="${solr.install.dir:../../../..}/dist/"
regex="solr-uima-\d.*\.jar" /> 

Step 2:modified  solrconfig.xml adding the following snippet and working API
keys:
<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">/Users/vaibhavlella/solr/solr-5.3.1/tester/OverridingParamsExtServicesAE.xml</str>
        
        <bool name="ignoreErrors">false</bool>
        
        <lst name="analyzeFields">
          <bool name="merge">false</bool>
          <arr name="fields">
            <str>body</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 3:modified schema.xml as follows:
<field name="text" type="text_general" indexed="true" stored="false"
multiValued="true"/>
<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_general" indexed="true" stored="true"
multiValued="true" required="false" />
  <copyField source="title" dest="text"/>
   <copyField source="author" dest="text"/>
   <copyField source="description" dest="text"/>
   <copyField source="keywords" dest="text"/>
   <copyField source="content" dest="text"/>
   <copyField source="content_type" dest="text"/>
   <copyField source="resourcename" dest="text"/>
   <copyField source="url" dest="text"/>
Step 4: Created a new UpdateRequestHandler with the following NOTE:using
solr.UpdateRequestHandler instead of solr.XmlUpdateRequestHandler since
error was being generated.
  
  <requestHandler name="/update" class="solr.UpdateRequestHandler">
    <lst name="defaults">
      <str name="update.chain">uima</str>
    </lst>
  </requestHandler>
Step 5:Tried to index books.json that is given in exampledocs with solr and
got the following warnings and no new fields were generated
$ bin/solr start -s tester/solr
$ bin/post -c newcore tester/books.json
The following was the response:
java -classpath /Users/vaibhavlella/solr/solr-5.3.1/dist/solr-core-5.3.1.jar
-Dauto=yes -Dc=newcore -Ddata=files org.apache.solr.util.SimplePostTool
tester/books.json
SimplePostTool version 5.0.0
Posting files to [base] url http://localhost:8983/solr/newcore/update...
Entering auto mode. File endings considered are
xml,json,csv,pdf,doc,docx,ppt,pptx,xls,xlsx,odt,odp,ods,ott,otp,ots,rtf,htm,html,txt,log
POSTing file books.json (application/json) to [base]
SimplePostTool: WARNING: Solr returned an error #500 (Server Error) for url:
http://localhost:8983/solr/newcore/update
SimplePostTool: WARNING: Response:
{"responseHeader":{"status":500,"QTime":6534},"error":{"msg":"processing
error null. id=978-0641723445, 
text=\"null...\"","trace":"org.apache.solr.common.SolrException: processing
error null. id=978-0641723445,  text=\"null...\"\n\tat
org.apache.solr.uima.processor.UIMAUpdateRequestProcessor.processAdd(UIMAUpdateRequestProcessor.java:127)\n\tat
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.handleAdds(JsonLoader.java:470)\n\tat
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.processUpdate(JsonLoader.java:134)\n\tat
org.apache.solr.handler.loader.JsonLoader$SingleThreadedJsonLoader.load(JsonLoader.java:113)\n\tat
org.apache.solr.handler.loader.JsonLoader.load(JsonLoader.java:76)\n\tat
org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:98)\n\tat
org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)\n\tat
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)\n\tat
org.apache.solr.core.SolrCore.execute(SolrCore.java:2068)\n\tat
org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:669)\n\tat
org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:462)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:214)\n\tat
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)\n\tat
org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)\n\tat
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)\n\tat
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)\n\tat
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat
org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)\n\tat
org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)\n\tat
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)\n\tat
org.eclipse.jetty.server.Server.handle(Server.java:499)\n\tat
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)\n\tat
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)\n\tat
org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)\n\tat
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)\n\tat
java.lang.Thread.run(Thread.java:745)\nCaused by:
org.apache.uima.analysis_engine.AnalysisEngineProcessException\n\tat
org.apache.uima.annotator.calais.OpenCalaisAnnotator.process(OpenCalaisAnnotator.java:206)\n\tat
org.apache.uima.analysis_component.CasAnnotator_ImplBase.process(CasAnnotator_ImplBase.java:56)\n\tat
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.callAnalysisComponentProcess(PrimitiveAnalysisEngine_impl.java:377)\n\tat
org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.processAndOutputNewCASes(PrimitiveAnalysisEngine_impl.java:295)\n\tat
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.processUntilNextOutputCas(ASB_impl.java:567)\n\tat
org.apache.uima.analysis_engine.asb.impl.ASB_impl$AggregateCasIterator.<init>(ASB_impl.java:409)\n\tat
org.apache.uima.analysis_engine.asb.impl.ASB_impl.process(ASB_impl.java:342)\n\tat
org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.processAndOutputNewCASes(AggregateAnalysisEngine_impl.java:267)\n\tat
org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:267)\n\tat
org.apache.uima.analysis_engine.impl.AnalysisEngineImplBase.process(AnalysisEngineImplBase.java:280)\n\tat
org.apache.solr.uima.processor.UIMAUpdateRequestProcessor.processText(UIMAUpdateRequestProcessor.java:173)\n\tat
org.apache.solr.uima.processor.UIMAUpdateRequestProcessor.processAdd(UIMAUpdateRequestProcessor.java:79)\n\t...
32 more\nCaused by: java.io.IOException: Server returned HTTP response code:
403 for URL: http://api.opencalais.com/enlighten/calais.asmx/Enlighten\n\tat
sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1839)\n\tat
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)\n\tat
org.apache.uima.annotator.calais.OpenCalaisAnnotator.callServiceOnText(OpenCalaisAnnotator.java:234)\n\tat
org.apache.uima.annotator.calais.OpenCalaisAnnotator.process(OpenCalaisAnnotator.java:126)\n\t...
43 more\n","code":500}}
SimplePostTool: WARNING: IOException while reading response:
java.io.IOException: Server returned HTTP response code: 500 for URL:
http://localhost:8983/solr/newcore/update
1 files indexed.
COMMITting Solr index changes to
http://localhost:8983/solr/newcore/update...
Time spent: 0:00:06.631

Stuck here for a long time need help.



--
View this message in context: 
http://lucene.472066.n3.nabble.com/Problems-integrating-Uima-with-solr-tp4243240.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to