lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Underwood <>
Subject Re: Lucene Filter That Will Remove Some Tokens By Regex Pattern?
Date Thu, 06 Jun 2013 15:00:42 GMT
On Jun 6, 2013, at 7:24 AM, Furkan KAMACI wrote:

> I want to use a core Lucene filter that will remove some tokens defined by
> a regex pattern. What is the appropriate class for it?

Use a pattern replace filter. That will give you zero-length tokens, which can cause odd matches.
Follow it with a length filter to remove those.

	<filter class="solr.PatternReplaceFilterFactory"
		pattern=".*" replacement="" replace="all"/>
	<filter class="solr.LengthFilterFactory" min="1" max="1024"/>

Walter Underwood

View raw message