You can use two fields, in one you keep the original data, and use the
second one as a copy field and use the Pattern Replace Filter combined with
the Keyword Tockenizer.


2013/3/7 Jochen Lienhard <lienh...@ub.uni-freiburg.de>

> Hello,
>
> we have indexed a field, where we have removed the whitespaces before the
> indexing.
>
> For example:
>
> 50A91
> Frei91\:9984
>
> Now we want allow the users to search for:
>
> 50 A 91
> Frei 91 \: 9984
>
> Our idea was to add a PatternReplaceFilterFactory in the query analyzer to
> remove the whitespaces:
> <charFilter class="solr.**PatternReplaceFilterFactory" pattern="(\s+)"
> replacement="" replace="all"/>
>
> But it does not work.
>
> For normal queries - we are using vufind als frontend - we can remove the
> whitespace in the yaml part, but if
> the user search with wildcards ... the yaml does not work ... so we hope
> to find a solution in solr.
>
> We are using solr 3.6.
>
> Thanks for ideas and hints.
>
> Greetings from Germany
>
> Jochen
>
> --
> Dr. rer. nat. Jochen Lienhard
> Dezernat EDV
>
> Albert-Ludwigs-Universität Freiburg
> Universitätsbibliothek
> Rempartstr. 10-16  | Postfach 1629
> 79098 Freiburg     | 79016 Freiburg
>
> Telefon: +49 761 203-3908
> E-Mail: lienh...@ub.uni-freiburg.de
> Internet: www.ub.uni-freiburg.de
>
>

Reply via email to