lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Harwood <markharw...@yahoo.co.uk>
Subject Re: ComplexPhraseQuery problems with simple phrases
Date Fri, 19 Feb 2010 21:04:51 GMT
This is because phrases are expected to contain >1 clause and the ComplexPhraseQueryParser
was expecting a BooleanQuery from the base class  which is used to hold the elements in the
phrase.

In this single-clause scenario I guess we could silently hide the error and return whatever
single query clause was inappropriately found between the quotes. 


On 19 Feb 2010, at 19:53, David Kaelbling wrote:

> Hi,
> 
> ComplexPhraseQueryParser doesn't appear to handle some simple wildcard
> phrases correctly.  In TestComplexPhraseQuery.testComplexPhrases() on
> trunk I tried these two tests:
> 
> 	checkMatches("\"j*n sm*h\"", "1,2");
> 	checkMatches("\"j*n\"", "1,2,3,4");
> 
> The first check succeeds.  The second throws an IllegalArgumentException
> trying to rewrite the query, complaining that WildcardQuery is an
> unknown query type.  If this is bad syntax I would have expected the
> first query to have failed too.
> 
> Does anyone have a fix?
> 
>    Thanks,
>    David
> 
> -- 
> David Kaelbling
> Senior Software Engineer
> Black Duck Software, Inc.
> 
> dkaelbling@blackducksoftware.com
> T +1.781.810.2041
> F +1.781.891.5145
> 
> http://www.blackducksoftware.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
> 


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


Mime
View raw message