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 Bill Janssen <ja...@parc.com> on 2004/10/05 00:09:27 UTC

Re: MultiFieldQueryParser seems broken... Fix attached.

Doug Cutting writes:
> >>http://issues.apache.org/eyebrowse/ReadMsg?listName=lucene-user@jakarta.apache.org&msgId=1798116
> > 
> > 
> > Yes, the approach there is similar.  I attempted to complete the
> > solution and provide a working replacement for MultiFieldQueryParser.
> 
> But, inspired by that message, couldn't MultiFieldQueryParser just be a 
> subclass of QueryParser that overrides getFieldQuery()?

This wouldn't catch PrefixQueries or RangeQueries, etc., would it?  If
QueryParser.TermQuery() wasn't final, you could just override it (or
fix it to do the right thing).

By the way, I've found a bug in my implementation of
MultiFieldQueryParser.  Single-word queries weren't being expanded
properly.  I've fixed that, and placed a revised copy of the code at
ftp://ftp.parc.xerox.com/pub/transient/janssen/SearchTest.java.  See
my original post at
http://issues.apache.org/eyebrowse/ReadMsg?listName=lucene-user@jakarta.apache.org&msgNo=9757
for instructions on how to use it.  Or just read the SearchTest.java code.

Bill

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org