lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tech.vronk" <>
Subject mapping values in fields
Date Tue, 02 Oct 2012 13:04:16 GMT

I try to map values from one field into other values in another field.
For example:
original_field: orig_value1
mapped_field: mapped_value1

with the help of an explicitely defined (N:1) mapping:
orig_value1 => mapped_value1
orig_value2 => mapped_value1
orig_value3 => mapped_value2

I have tried to use SynonymFilterFactory
for the mapped_field:

<fieldtype name="mapped_field" class="solr.TextField">
       <analyzer type="index">
           <tokenizer class="solr.WhitespaceTokenizerFactory"/>
           <filter class="solr.SynonymFilterFactory" 
synonyms="region-map.txt" ignoreCase="true" expand="true"/>

combined with:
<copyField src="original_field" dest="mapped_field" />

Now, a search for
yields results,
however in the result the mapped_value1 does not appear at all,
but instead the orig_value1 appears also in the mapped_field.

How can I achieve, that the mapped_value appears in the result as well?

thank you,


View raw message