You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Paul Taylor <pa...@fastmail.fm> on 2010/03/20 08:20:32 UTC
Trying to simplify MappingCharFilter to match whole field
I'm trying to create a CharFilter which works like MappingCharFilter but
only changes the matchString if the match String matches the whole field
rather than a portion in the field (this is to handle some exceptions
wiyout effecting other data). Trouble is the code in MappingCharFilter
is devoid of comments and I cant figure out what I need to change, any
ideas ?
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Trying to simplify MappingCharFilter to match whole field
Posted by Paul Taylor <pa...@fastmail.fm>.
Koji Sekiguchi wrote:
> Paul Taylor wrote:
>> I'm trying to create a CharFilter which works like MappingCharFilter
>> but only changes the matchString if the match String matches the
>> whole field rather than a portion in the field (this is to handle
>> some exceptions wiyout effecting other data). Trouble is the code in
>> MappingCharFilter is devoid of comments and I cant figure out what I
>> need to change, any ideas ?
>>
>> Paul
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-user-help@lucene.apache.org
>>
>>
> I'm not sure I understand your problem correctly,
> but can you use PatternReplaceCharFilter in Solr?
>
> http://lucene.apache.org/solr/api/org/apache/solr/analysis/PatternReplaceCharFilter.html
>
>
> Koji
>
That would work but its a heacyweight solution and you have I would have
to use a seperate instance of PatternReplaceCharFilter for every
exception. What I want is quite straight forward give an exception of
'!!!' it should match a field with text of '!!!!' but not 'Start!!!' or
"!!!End', so it seems this is a simple version of MappingCharFilter
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Trying to simplify MappingCharFilter to match whole field
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Paul Taylor wrote:
> I'm trying to create a CharFilter which works like MappingCharFilter
> but only changes the matchString if the match String matches the whole
> field rather than a portion in the field (this is to handle some
> exceptions wiyout effecting other data). Trouble is the code in
> MappingCharFilter is devoid of comments and I cant figure out what I
> need to change, any ideas ?
>
> Paul
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
I'm not sure I understand your problem correctly,
but can you use PatternReplaceCharFilter in Solr?
http://lucene.apache.org/solr/api/org/apache/solr/analysis/PatternReplaceCharFilter.html
Koji
--
http://www.rondhuit.com/en/
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org