I don't use a query parser at all, so that's no issue.  I just need a
BooleanQuery to realize that it only has negative clauses and do the right
thing.  Right now I have to include a bogus static field in every single
document so that I can use a TermQuery on that bogus field as the left side
of a BooleanQuery subtract.  Sure, it works, but it ain't pretty...

Scott

> -----Original Message-----
> From: Doug Cutting [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, November 01, 2001 10:49 AM
> To: 'Lucene Users List'
> Subject: RE: Problems with prohibited BooleanQueries
> 
> 
> > From: Scott Ganyo [mailto:[EMAIL PROTECTED]]
> > 
> > How difficult would it be to get BooleanQuery to do a 
> > standalone NOT, do you
> > suppose?  That would be very useful in my case.
> 
> It would not be that difficult, but it would make queries 
> slow.  All terms
> not containing a term would need to be enumerated.  Since 
> most terms occur
> in only a small percentage of the documents, most NOT queries 
> would return
> most documents.
> 
> Scoring would also be strange.  I guess you'd give them all a 
> score of 1.0,
> and hope that the query is nested in a more complex query that will
> differentiate the scores.  But if it's nested, then you could 
> do it with
> BooleanQuery as it stands...
> 
> So, my question to you is: do you actually want lists of all 
> documents that
> do not contain a term, or, rather, do you want to use negation in the
> context of other query terms, and are having trouble getting 
> your query
> parser to build BooleanQueries?
> 
> Doug
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
<mailto:[EMAIL PROTECTED]>

Reply via email to