lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lance Norskog <goks...@gmail.com>
Subject Re: Stripping Punctuation in a fieldType
Date Sat, 16 Jan 2010 05:50:04 GMT
If your user query syntax has a small number of features, you could
write your own query parser.

On Fri, Jan 15, 2010 at 4:18 PM, Koji Sekiguchi <koji@r.email.ne.jp> wrote:
> David,
>
> PatternReplaceCharFilterFactory accepts pattern and replacement args.
> Please read PatternReplaceCharFilter javadoc to see few samples:
>
> http://lucene.apache.org/solr/api/org/apache/solr/analysis/PatternReplaceCharFilter.html
>
> Koji
>
> --
> http://www.rondhuit.com/en/
>
>
>
> David Seltzer wrote:
>>
>> Does anyone out there know how to use PatternReplaceCharFilterFactory?
>>
>> The closest think to an example I see is in the default schema.xml:
>> <!--
>>  The PatternReplaceFilter gives you the flexibility to use
>>             Java Regular expression to replace any sequence of
>> characters
>>             matching a pattern with an arbitrary replacement string,
>>       which may include back references to portions of the
>> original
>>             string matched by the pattern.
>>                         See the Java Regular Expression documentation
for
>> more
>>             information on pattern and replacement string syntax.
>>
>>  http://java.sun.com/j2se/1.5.0/docs/api/java/util/regex/package-summary.
>> html
>>          -->
>> <filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])"
>> replacement="" replace="all"/>
>>
>> I'm not sure how the PatternReplaceCharFilterFactory differs from the
>> PatternReplaceFilterFactory. Can anyone give me an example of how to
>> strip all commas for example using this technique?
>>
>> Thanks!
>>
>> -Dave
>>
>
>
>



-- 
Lance Norskog
goksron@gmail.com

Mime
View raw message