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 Curtis Wilde <ga...@gmail.com> on 2011/06/29 21:12:00 UTC

Strip Punctuation From Field

>From all I've read, using something like PatternReplaceFilterFactory allows
you to replace / remove text in an index, but is there anything similar that
allows manipulation of the text in the associated field? For example, if I
pulled a status from Twitter like, "Hi, this is a #hashtag." I would like to
remove the "#" from that string and use it for both the index, and also the
field value that is returned from a query, i.e., "Hi, this is a hashtag".

Re: Strip Punctuation From Field

Posted by Tomás Fernández Löbbe <to...@gmail.com>.
Not that I'm aware of. This is probably something you want to do at the
application layer. If you want to do it in Solr, a good place would be an
UpdateRequestProcessor, but I guess you'll have to implement your own.

On Wed, Jun 29, 2011 at 4:12 PM, Curtis Wilde <ga...@gmail.com> wrote:

> From all I've read, using something like PatternReplaceFilterFactory allows
> you to replace / remove text in an index, but is there anything similar
> that
> allows manipulation of the text in the associated field? For example, if I
> pulled a status from Twitter like, "Hi, this is a #hashtag." I would like
> to
> remove the "#" from that string and use it for both the index, and also the
> field value that is returned from a query, i.e., "Hi, this is a hashtag".
>