I there a way to postprocess a field after analyze?

Saying postprocess I think of renaming, moving or appending fields.


Some more information:

My schema.xml contains several language suffixed fields (nouns_de, ...).
Each of these is analyzed in a language dependent way:

<fieldType name=" nouns_de" class="solr.TextField" positionIncrementGap="100">
  <analyzer type="index">
    <tokenizer class="solr.UIMATypeAwareAnnotationsTokenizerFactory"
      descriptorPath="/uima/AggregateSentenceDEAE.xml" 
tokenType="org.apache.uima.TokenAnnotation" featurePath="posTag"/>
    <filter class="solr.TypeTokenFilterFactory" useWhitelist="true" 
types="/uima/whitelist_de.txt" />
  </analyzer>
  <analyzer type="query">
    <tokenizer class="solr.WhitespaceTokenizerFactory"/>
  </analyzer>
</fieldType>

When I do a facted search I have to include every field_lang combination since 
I do not know the language at query time:

http://localhost:8983/solr/master/select?q=*:*&rows=0&facet=true&facet.field=nouns_de&facet.field=nouns_en&facet.field=nouns_fr&facet.field=nouns_nl
 ...

So I have to merge all terms in my own business logic :-(


Any idea / pointer to rename fields after analyze?

This post says it's not possible with the current API:
http://lucene.472066.n3.nabble.com/copyField-after-analyzer-td3900337.html


Another approach would be to allow analyzer configuration depending on another 
field value (language).


regards,

Kai Gülzau

Reply via email to