> In my schema.xml, I am trying to remove whitespace from a
> multivalued
> field as they come from the database. Is this the correct
> way:
> 
>    <fieldType name="size"
> class="solr.TextField">
>       <analyzer type="query">
>         <tokenizer
> class="solr.StandardTokenizerFactory"/>
>         <filter
> class="solr.TrimFilterFactory" />
>       </analyzer>
>     </fieldType>
> 
> I do not believe this is working.

TrimFilterFactory trims leading and trailing white-spaces. But 
StandardTokenizerFactory already eats up white-spaces. In other words it is 
meaningless to use it with StandardTokenizerFactory.

In your field type definition you specified only query analyzer but not index 
analyzer. You can use this directly:

<fieldType name="size" class="solr.TextField">
    <analyzer>
    <tokenizer class="solr.StandardTokenizerFactory"/>        
    </analyzer>
</fieldType>

What do you mean by removing whitespace from a multivalued field as they come 
from the database?



Reply via email to