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 Eric Wilson <wi...@gmail.com> on 2013/03/22 15:39:41 UTC

PatternReplaceFilterFactory -- what does this regex do?

I'm using the Solr Suggester for autocompletion with WFSTLookup suggest
component, and a text file with phrases and weights. (
http://wiki.apache.org/solr/Suggester)

I found that the following filter made it impossible to match on
ampersands. So I removed it. But I'm sure it was there for a reason. What
was this suppose to do?

<filter class="solr.PatternReplaceFilterFactory" pattern=
"([^\p{L}\p{M}\p{N}\p{Cs}]*[\p{L}\p{M}\p{N}\p{Cs}\_]+:)|([^\p{L}\p{M}\p{N}\p{Cs}])+"
replacement=" " replace="all"/>

Thanks,

Eric Wilson