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 Kai Gülzau <kg...@novomind.com> on 2013/02/08 16:11:51 UTC

copy Field / postprocess Fields after analyze / dynamic analyzer config

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


Re: copy Field / postprocess Fields after analyze / dynamic analyzer config

Posted by Erick Erickson <er...@gmail.com>.
Not that I know of, sorry.

Best
Erick


On Fri, Feb 8, 2013 at 10:11 AM, Kai Gülzau <kg...@novomind.com> wrote:

> 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
>
>