Hi All

I worked without integrating UIMA in to Solr but doing it seperately..and it
worked now!

I did not use the Solr-UIMA update processor this time. What I did is this:
1) Take the document, extract the static fields i need... and later send it
in to the pipeline.
2) Take the output of the pipeline and extract all the key-value pairs, and
add them to solrdoc. (this was the approach followed, before using Solr,
with a lucene based indexer wrote within the team!)
3) Now add the Document to a Collection of SolrDocs
4) Commit to the server every few docs.

I was able to index a trial sample of 100 Docs with all the UIMA fields. So,
I am hoping that this is going to work for bigger set of documents!

Thanks for all the suggestions over the past few days!!

S

On Thu, Jul 14, 2011 at 11:48 AM, Tommaso Teofili <tommaso.teof...@gmail.com
> wrote:

> 2011/7/13 Sowmya V.B. <vbsow...@gmail.com>
>
> > Hello Tomasso
> >
> > Thanks for the reply.
> >
> > I did added uima chain to /javabin handler as you suggested. Now, I get
> an
> > internal server error!
> >
> > Here is the stacktrace.
> >
> > request:
> >
> http://localhost:8080/apache-solr-3.3.0/update/javabin?wt=javabin&version=2
> > org.apache.solr.common.SolrException: Internal Server Error
> >
> > Internal Server Error
> >
> > request:
> >
> http://localhost:8080/apache-solr-3.3.0/update/javabin?wt=javabin&version=2
> >    at
> >
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)
> >    at
> >
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
> >    at
> >
> >
> org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
> >    at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:49)
> >    at indexerapp.ir4llSolrIndexer.indexAll(ir4llSolrIndexer.java:150)
> >
> >
> > Now, I began tracing back from the instructional README.txt file. A few
> > doubts:
> >
> > 1) copy generated solr-uima jar and its libs (under contrib/uima/lib)
> > inside
> > a Solr libraries directory. or set <lib/> tags in solrconfig.xml
> > appropriately to point those jar files. <lib dir="../../contrib/uima/lib"
> > />
> > <lib dir="../../dist/" regex="apache-solr-uima-\d.*\.jar" />
> > -Which Solr Libraries directory does this refer to??
>
>
> this refers to:
>
> commons-digester-2.0.jar
> uima-an-alchemy-2.3.1-SNAPSHOT-r1062868.jar
> uima-an-calais-2.3.1-SNAPSHOT-r1062868.jar
> uima-an-tagger-2.3.1-SNAPSHOT-r1062868.jar
> uima-an-wst-2.3.1-SNAPSHOT-r1076132.jar
> uimaj-core-2.3.1.jar
>
> you can find them at:
>
> http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_3/solr/contrib/uima/lib/
>
>
>
>
> > Does it refer to the
> > Lib director inside the WEB-INF folder of the Solr webapp?
> >
>
> no, the relative paths in the README and sample solrconfig.xml files refer
> to the source code structure.
> However, since you're working from Eclipse and it's not always
> straightforward to understand what's the base directory for Eclipse, I'd
> advice to use absolute paths to start and then eventually switch to
> relative
> ones when everything's ok.
>
>
> >
> > 2)
> >
> > <lst name="analyzeFields">
> >          <bool name="merge">false</bool>
> >          <arr name="fields">
> >            <str>text</str>
> >          </arr>
> >        </lst>
> >
> > -the only field I need to send through the pipeline is "text" field. Is
> it
> > enough if I specify that inside SolrConfig in this point...or should I do
> > something more?
> >
>
> this is ok
>
>
> >
> > 3) Where can I see a more detailed Log about what is happening inside
> Solr?
> > I am running Solr from Eclipse + Tomcat. Neither the Console nor the
> > Eclipse
> > Tomcat log show me a detailed errorlog.
> >
>
> you can change the logging levels from :
> http://solrurl:solrport/solr/admin/logging
>
> Hope this helps,
> Tommaso
>
>
> >
> > S
> > On Wed, Jul 13, 2011 at 4:48 PM, Tommaso Teofili
> > <tommaso.teof...@gmail.com>wrote:
> >
> > > Hello,
> > >
> > > I think the problem might be the following, if you defined the update
> > > request handlers like in the sample solrconfig :
> > >
> > > <updateRequestProcessorChain name="uima">
> > >     <processor
> > >
> class="org.apache.solr.uima.processor.UIMAUpdateRequestProcessorFactory">
> > >      <lst name="uimaConfig">
> > >     ....
> > > </updateRequestProcessorChain>
> > >
> > > <requestHandler name="/update" class="solr.XmlUpdateRequestHandler">
> > >    <lst name="defaults">
> > >      <str name="update.chain">uima</str>
> > >    </lst>
> > >  </requestHandler>
> > > ...
> > >  <requestHandler name="/update/javabin"
> > > class="solr.BinaryUpdateRequestHandler" />
> > >
> > > then the uima update chain will be executed only for HTTP POSTs on
> > /update
> > > and not for /update/javabin (that is used by SolrJ), so you may need to
> > > update the /update/javabin configuration as follows:
> > >
> > > <requestHandler name="/update/javabin"
> > > class="solr.BinaryUpdateRequestHandler" >
> > >  <lst name="defaults">
> > >      <str name="update.chain">uima</str>
> > >    </lst>
> > > </requestHandler>
> > >
> > > Hope this helps,
> > > Tommaso
> > >
> > >
> > > 2011/7/13 Erick Erickson <erickerick...@gmail.com>
> > >
> > > > I'll have to punt here. I don't know the internals well enough to
> say.
> > I
> > > > suppose
> > > > it's possible that the "required fields" check happens *before* the
> > UIMA
> > > > stuff happens, but since I know so little about UIMA that's a blind
> > guess
> > > > at best...
> > > >
> > > > Anyone with real knowledge want to chime in here?
> > > >
> > > > Erick
> > > >
> > > > On Wed, Jul 13, 2011 at 8:08 AM, Sowmya V.B. <vbsow...@gmail.com>
> > wrote:
> > > > > Hi Eric*
> > > > >
> > > > >>>If I'm reading this right, you're labeling certain fields as
> > required.
> > > > All
> > > > > docs MUST have those fields (I admit the error message could be
> more
> > > > > informative). So it sounds like things are behaving as I'd expect,
> > your
> > > > > documents just don't contain the required fields.*
> > > > > - But, the UIMA pipeline is supposed to add the missing fields for
> > the
> > > > > document.
> > > > >
> > > > > Since "ant clean dist" compiled without build errors, and it was
> > > > essentially
> > > > > the same pipeline I already used before on a different indexer, I
> can
> > > say
> > > > > that there is no problem with the Pipeline as such.
> > > > >
> > > > > That again gets back my other query: While indexing, should I
> mention
> > > > > something else, apart from just saying:
> > > > >
> > > > > Something like:
> > > > > doc1.addfield(A)
> > > > > doc1.addfield(B)
> > > > > docs.add(doc1)
> > > > > ....
> > > > >
> > > > > docN.addfield(A)
> > > > > docN.addfield(B)
> > > > > docs.add(docN)
> > > > >
> > > > > UpdateResponse response = server.add(docs)
> > > > >
> > > > > - My understanding was that: the UIMAProcessor runs after I say
> > > > > server.add()... inside the updateprocessor. Is it not so?
> > > > >
> > > > > S
> > > > >
> > > > > On Wed, Jul 13, 2011 at 2:00 PM, Erick Erickson <
> > > erickerick...@gmail.com
> > > > >wrote:
> > > > >
> > > > >> If I'm reading this right, you're labeling certain fields as
> > required.
> > > > All
> > > > >> docs
> > > > >> MUST have those fields (I admit the error message could be more
> > > > >> informative). So it sounds like things are behaving as I'd expect,
> > > your
> > > > >> documents just don't contain the required fields.
> > > > >>
> > > > >> Best
> > > > >> Erick
> > > > >>
> > > > >> On Wed, Jul 13, 2011 at 4:54 AM, Sowmya V.B. <vbsow...@gmail.com>
> > > > wrote:
> > > > >> > Hi All
> > > > >> >
> > > > >> > I have a problem making the indexer work with the UIMA fields.
> > > > >> >
> > > > >> > Here is what I did (With the help of this community): I compiled
> a
> > > > >> > Solr-UIMA-snapshot, using "ant clean dist", by adding my own
> > > > annotators
> > > > >> > there.
> > > > >> > It compiled without any errors. and i obtained a jar file.
> > > > >> >
> > > > >> > Now, following the instructions on the readme (
> > > > >> >
> > > > >>
> > > >
> > >
> >
> https://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_3/solr/contrib/uima/README.txt
> > > > >> > )
> > > > >> >
> > > > >> >  I modified my SolrConfig.xml and Schema.xml as suggested in the
> > > > README.
> > > > >> >
> > > > >> > As long as i say "required=false" on the UIMA generated fields,
> > the
> > > > >> indexing
> > > > >> > works fine...without a UIMA annotation.
> > > > >> >
> > > > >> > However, once I say "required=true", I get an error:
> > > > >> >
> > > > >> > request:
> > > > >> >
> > > >
> > http://anafi:8080/apache-solr-3.3.0/update/javabin?wt=javabin&version=2
> > > > >> > org.apache.solr.common.SolrException: Bad Request
> > > > >> >
> > > > >> > Bad Request
> > > > >> >
> > > > >> > request:
> > > > >> >
> > > > >>
> > > >
> > >
> >
> http://localhost:8080/apache-solr-3.3.0/update/javabin?wt=javabin&version=2
> > > > >> >    at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:435)
> > > > >> >    at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:244)
> > > > >> >    at
> > > > >> >
> > > > >>
> > > >
> > >
> >
> org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105)
> > > > >> >    at
> > > org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:49)
> > > > >> >    at
> > > indexerapp.ir4llSolrIndexer.indexAll(ir4llSolrIndexer.java:150)
> > > > >> >    at indexerapp.ir4llSolrIndexer.main(ir4llSolrIndexer.java:57)
> > > > >> >
> > > > >> > Is thre something during indexing that I need to do apart from
> > > saying:
> > > > >> >
> > > > >> > UpdateResponse response = server.add(docs);
> > > > >> > (where docs is a collection of documents, without UIMA
> indexing.)
> > > > >> >
> > > > >> > My understanding is that the UIMA annotation happens after
> calling
> > > the
> > > > >> > server.add(docs). Is that right?
> > > > >> >
> > > > >> > S.
> > > > >> > --
> > > > >> > Sowmya V.B.
> > > > >> > ----------------------------------------------------
> > > > >> > Losing optimism is blasphemy!
> > > > >> > http://vbsowmya.wordpress.com
> > > > >> > ----------------------------------------------------
> > > > >> >
> > > > >>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Sowmya V.B.
> > > > > ----------------------------------------------------
> > > > > Losing optimism is blasphemy!
> > > > > http://vbsowmya.wordpress.com
> > > > > ----------------------------------------------------
> > > > >
> > > >
> > >
> >
> >
> >
> > --
> > Sowmya V.B.
> > ----------------------------------------------------
> > Losing optimism is blasphemy!
> > http://vbsowmya.wordpress.com
> > ----------------------------------------------------
> >
>



-- 
Sowmya V.B.
----------------------------------------------------
Losing optimism is blasphemy!
http://vbsowmya.wordpress.com
----------------------------------------------------

Reply via email to