lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tommaso Teofili <>
Subject Re: Solr + DictionaryAnnotator UIMA
Date Wed, 08 Jun 2011 17:52:56 GMT
Hello Paco,

you didn't mention adding of the DictionaryAnnotator jar to the libs but I'm
pretty sure you did it.

2011/6/8 PacoPeralta <>

> Then I modified solrconfig.xml to add the next FieldMapping:
>  <lst name="type">
>            <str name="name">org.apache.uima.TokenAnnotation</str>
>            <lst name="mapping">
>              <str name="feature">tokenType</str>
>              <str name="field">dic_field</str>
>            </lst>
>          </lst>
> After these steps I don't get the expected results.
> Did I need to take any additional steps?

I think you're not getting what you expected due to the above configuration,
you've configured to use the TokenAnnotations as source for your dic_field
field but you should've been set the annotation type defined in the
dictionary.xml (org.apache.uima.DictionaryEntry).
Also, trying to debug your scenario I found an error in the UIMAToSolrMapper
so I opened SOLR-2581 [1].
This is due to the fact that DictionaryAnnotator typeSystem classes have not
be explicitly generated and included in the jar so using reflection leads to
an error, however with the patch provided I was able to make it work with
your same configuration except that for the following:

         <lst name="type">
           <str name="name">org.apache.uima.DictionaryEntry</str>
           <lst name="mapping">
             <str name="feature">coveredText</str>

             <str name="field">dic_field</str>

Hope this helps,

[1] :

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