Sounds good!  Unfortunately the ComplexPhraseQuery class and members are not 
visible, so this isn't something that I can easily repair outside the library.

--
David Kaelbling
Senior Software Engineer
Black Duck Software, Inc.

dkaelbl...@blackducksoftware.com
T +1.781.810.2041
F +1.781.891.5145

http://www.blackducksoftware.com
________________________________________
From: Mark Harwood [markharw...@yahoo.co.uk]
Sent: Friday, February 19, 2010 4:04 PM
To: java-dev@lucene.apache.org
Subject: Re: ComplexPhraseQuery problems with simple phrases

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.
>
> dkaelbl...@blackducksoftware.com
> T +1.781.810.2041
> F +1.781.891.5145
>
> http://www.blackducksoftware.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: java-dev-h...@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to