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 Landon Kuhn <la...@gmail.com> on 2010/09/02 19:10:02 UTC

false matches with ReversedWildcardFilterFactory

Hello, I am using the ReversedWildcardFilterFactory, and I am
wondering if there is a way to prevent false matches when a query
token matches the reversed indexed token. For instance, the query
*zemog* matches documents that contain Gomez. I am pretty much using
the fieldType configuration from the sample schema.xml:

		<fieldType name="text" class="solr.TextField"
positionIncrementGap="100" omitNorms="true" termPositions="false"
termOffsets="false" sortMissingLast="true">
			<analyzer type="index">
				<tokenizer class="solr.WhitespaceTokenizerFactory"/>
				<filter class="solr.LowerCaseFilterFactory"/>
				<filter class="solr.ReversedWildcardFilterFactory"
withOriginal="true" maxPosAsterisk="3" maxPosQuestion="2"
maxFractionAsterisk="0.33"/>
			</analyzer>
			<analyzer type="query">
				<tokenizer class="solr.WhitespaceTokenizerFactory"/>
				<filter class="solr.LowerCaseFilterFactory"/>
			</analyzer>
		</fieldType>

Re: false matches with ReversedWildcardFilterFactory

Posted by Robert Muir <rc...@gmail.com>.
On Fri, Sep 3, 2010 at 11:55 AM, Yonik Seeley <yo...@lucidimagination.com>wrote:

>
> Off the top of my head, I'm not sure of an easy way to prevent this.
>

we could fix this in trunk easily for these queries, with
intersection/subtraction (e.g. minus "\u0001.*" from the DFA)

-- 
Robert Muir
rcmuir@gmail.com

Re: false matches with ReversedWildcardFilterFactory

Posted by Yonik Seeley <yo...@lucidimagination.com>.
On Thu, Sep 2, 2010 at 1:10 PM, Landon Kuhn <la...@gmail.com> wrote:
> Hello, I am using the ReversedWildcardFilterFactory, and I am
> wondering if there is a way to prevent false matches when a query
> token matches the reversed indexed token. For instance, the query
> *zemog* matches documents that contain Gomez.

Hmm, we prefixed the reversed tokens so that term queries like zemog
and prefix queries like zemog* wouldn't match... but we didn't think
about wildcards.

Off the top of my head, I'm not sure of an easy way to prevent this.
Perhaps we should have used a different field for the reversed tokens.

-Yonik
http://lucenerevolution.org Lucene/Solr Conference, Boston Oct 7-8