Hi Antony, Antony Sequeira wrote: > In the attached test file I am using string queries and showing the > failure case.
The attachment didn't make it for some reason. > Basically I get the impression that I can not have a clause like > +(-x:y) anywhere in my query. What follows assumes that the "+(...)" wraps the user input, and is your attempt to work around the exclusively-negative-query problem. You can directly use MatchAllDocsQuery[1], or you can use Yonik Seeley's fix to allow this kind of thing in QueryParser syntax[2] (the "*:*" construct, which inserts a MatchAllDocsQuery for you), first available in release 2.1 -- something like "*:* -x:y" should do the trick for you. Did the *:* construct ever make it into the docs? I see the patch for LUCENE-723 doesn't contain any doc changes. This should be mentioned in the QP syntax documentation[3], shouldn't it? And I think Daniel Noll is right, this looks like an FAQ. Steve [1] <http://lucene.apache.org/java/2_1_0/api/org/apache/lucene/search/MatchAllDocsQuery.html> [2] <http://issues.apache.org/jira/browse/LUCENE-723> [3] <http://lucene.apache.org/java/docs/queryparsersyntax.html> -- Steve Rowe Center for Natural Language Processing http://www.cnlp.org/tech/lucene.asp --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]