On 8/31/2010 8:49 AM, Shawn Heisey wrote:
I believe I may have solved this. After a more careful reading of
SOLR-1653, I noticed that they referred to another filter. I changed
my configuration from /solr/.PatternReplaceCharFilterFactory to
/solr/.PatternReplaceFilterFactory and updated the XML syntax
appropriately, and it looks OK now. This filter is not mentioned on
the wiki page dealing with analyzers, which is why I did not use it
from the start. When I searched that page for regex, the CharFilter
was the only one that came up.
Final working config, for anyone else that has a desire to do this:
<filter class="solr.PatternReplaceFilterFactory"
pattern="^(\p{Punct}*)(.*?)(\p{Punct}*)$"
replacement="$2"
/>
I haven't yet tried it, but this filter seems to exist in the Solr 1.4.1
war file, so it should work there too.
Thanks,
Shawn