You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Sujit Pal <su...@comcast.net> on 2011/07/08 18:14:35 UTC

Re: (Solr-UIMA) Doubt regarding integrating UIMA in to solr - Configuration.

Hi Sowmya,

I basically wrote an annotator and built a buffering tokenizer around it
so I could include it in a Lucene analyzer pipeline. I've blogged about
it, not sure if its good form to include links to blog posts in public
forums, but here they are, apologies in advance if this is wrong (let me
know and I won't do it again).

http://sujitpal.blogspot.com/2011/06/uima-analysis-engine-for-keyword.html 
http://sujitpal.blogspot.com/2011/06/running-uima-analysis-engine-in-lucene.html 

Of course, this is in Lucene land. I haven't worked with the SOLR-UIMA
stuff so this may not answer your question directly. But I think if you
build an Tokenizer or TokenFilter then you can declare it as an analyzer
chain in SOLR.

HTH
Sujit

On Fri, 2011-07-08 at 09:19 +0200, Sowmya V.B. wrote:
> Hi Koji
> 
> Thanks for the mail.
> 
> Thanks for all the clarifications. I am now using the version 3.3.. But,
> another query that I have about this is:
> How can I add an annotator that I wrote myself, in to Solr-UIMA?
> 
> Here is what I did before I moved to Solr:
> I wrote an annotator (which worked when I used plain vanilla lucene based
> indexer), which enriched the document with more fields (Some statistics
> about the document...all fields added were numeric fields). Those fields
> were added to the index by extending *JCasAnnotator_ImplBase* class.
> 
> But, in Solr-UIMA, I am not exactly clear on where the above setup fits in.
> I thought I would get an idea looking at the annotators that came with the
> UIMA integration of Solr, but their source was not available. So, I do not
> understand how to actually integrate my own annotator in to UIMA.
> 
> Can you please explain on how to go about this?
> 
> Sowmya.
> 
> On Fri, Jul 8, 2011 at 2:03 AM, Koji Sekiguchi <ko...@r.email.ne.jp> wrote:
> 
> > (11/07/07 18:38), Sowmya V.B. wrote:
> >
> >> Hi
> >>
> >> I am trying to add UIMA module in to Solr..and began with the readme file
> >> given here.
> >> https://svn.apache.org/repos/**asf/lucene/dev/tags/lucene_**
> >> solr_3_1/solr/contrib/uima/**README.txt<https://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_1/solr/contrib/uima/README.txt>
> >>
> >
> > I would recommend you to use Solr 3.3 rather than 3.1, as we have changed
> > some configuration
> > in solrconfig.xml for UIMA.
> >
> >
> >  2. modify your schema.xml adding the fields you want to be hold
> >> metadata specifying proper values for type, indexed, stored and
> >> multiValued options:
> >>
> >> -I understood this line as: adding to my schema.xml, the new fields that
> >> will come as a result of a UIMA pipeline. For example, in my UIMA
> >> pipeline,
> >> post-processing, I get fields A,B,C in addition to fields X,Y,Z that I
> >> already added to the SolrInputDocument. So, does this mean I should add
> >> A,B,C to the schema.xml?
> >>
> >
> > I think you got it. Have you tried it but you got some errors?
> >
> >
> >  3. In SolrConfig.xml,
> >>
> >> inside,
> >>
> >> <uimaConfig>
> >>     <runtimeParameters>
> >>
> >
> > The uimaConfig tag has been moved into update processor setting @ Solr 3.2.
> > Please see the latest README.txt.
> >
> >
> >  if iam not using any of those "alchemy api key..." etc, I think I can
> >> remove
> >> those lines. However, I plan to use the openNLP tagger&  tokenizer, and an
> >> annotator I wrote for my task. Can I give my model file locations here as
> >> runtimeParameters?
> >>
> >
> > I don't have an idea of openNLP.
> >
> >
> >  4. I did not understand what "fieldMapping" tag does. The description
> >> said:
> >> "field mapping describes which features of which types should go in a
> >> field"--
> >> - For example, in this snippet from the link:
> >>
> >>  <type name="org.apache.uima.alchemy.**ts.concept.ConceptFS">
> >>        <map feature="text" field="concept"/>
> >>       </type>
> >>
> >> -what does "feature" mean and what does "field" mean?
> >>
> >
> > This defines a map uima feature:
> >
> > http://uima.apache.org/d/**uimaj-2.3.1/references.html#**
> > ugr.ref.xml.component_**descriptor.type_system.**features<http://uima.apache.org/d/uimaj-2.3.1/references.html#ugr.ref.xml.component_descriptor.type_system.features>
> >
> > to Solr field.
> >
> > koji
> > --
> > http://www.rondhuit.com/en/
> >
> 
> 
>