lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommaso Teofili <tommaso.teof...@gmail.com>
Subject Re: solr- Uima integration
Date Tue, 19 Apr 2011 07:17:37 GMT
Hi Isha

2011/4/18 Isha Garg <isha.garg@orkash.com>

> Can anyone explain me the  what are runtimeParameters specified in the
> <uimaConfig> as in link http://wiki.apache.org/solr/SolrUIMA. also tell me
> how to integrate our own analysis engine to solr. I  am new to this.


the runtimeParameters contains parameters' settings that one doesn't want to
set inside the UIMA descriptors when they can change on each Solr
installation. Such parameters are defined in the main aggregate Analysis
Engine UIMA descriptorwhich maps one parameter (called overridingParameter
in UIMA) to one of its delegates.

As you've seen in the wiki page, the default configuration of SolrUIMA
contains the following analysis pipeline:


        <node>AggregateSentenceAE</node>
        <node>OpenCalaisAnnotator</node>
        <node>TextKeywordExtractionAEDescriptor</node>
        <node>TextLanguageDetectionAEDescriptor</node>
        <node>TextCategorizationAEDescriptor</node>
        <node>TextConceptTaggingAEDescriptor</node>
        <node>TextRankedEntityExtractionAEDescriptor</node>

so if you want to use the external services of OpenCalais
(OpenCalaisAnnotator) and AlchemyAPI (Text*AEDescriptor) you will need to
set a personal API key value in each of those descriptors.To set the API key
you may need to unpack the jar, write it inside each descriptor, repackage
the jar. To get rid of that overriding parameters have been set inside the
default aggregate descriptor (which contains the above pipeline definition)
[1] with the following snippet(s):

<configurationParameter>
<name>
oc_licenseID
</name>
<type>
String
</type>
<multiValued>
false
</multiValued>
<mandatory>
true
</mandatory>
<overrides>
<parameter>
OpenCalaisAnnotator/licenseID
</parameter>
</overrides>
</configurationParameter>

so specifying in <runtimeParameters> the element <oc_licenseID> with text
value 123123123 will set the licenseID for OpenCalaisAnnotator to 123123123
without having to change UIMA descriptors.


2011/4/19 Isha Garg <isha.garg@orkash.com>

> Hi All!
>            I want to integrate Uima-solr . I followed the steps in the
> readme file.I am using apache solr3.1. The jar file starts fine. But  I dont
> know the exact syntax in solrj to index my documents for Uima-solr
> integration .Can anyone help me out rgarding this>
>
>
If you set up solrconfig as specified inside the README [2] at point 8 and 9
replacing the existing /update RequestHandler you should be able to index
via SolrJ as usual, alternatively you can take inspiration from the method
addDoc(String) in UIMAUpdateRequestProcessorTest [3].

Hope this helps,
Tommaso

[1] :
http://svn.apache.org/repos/asf/lucene/dev/trunk/solr/contrib/uima/src/main/resources/org/apache/uima/desc/OverridingParamsExtServicesAE.xml
[2] :
https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/contrib/uima/README.txt

[3] :
http://svn.apache.org/viewvc/lucene/dev/tags/lucene_solr_3_1/solr/contrib/uima/src/test/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessorTest.java?view=markup

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message