I'm not sure I see an easy translation of "copyright !mycompany" into SpanQueries which is how all the other queries are being converted. SpanNotQuery isn't applicable here because that only tests spans don't overlap. Yonik's approach looks good.
----- Original Message ---- From: Yonik Seeley <[EMAIL PROTECTED]> To: java-dev@lucene.apache.org Cc: David Kaelbling <[EMAIL PROTECTED]> Sent: Thursday, 11 December, 2008 16:33:39 Subject: Re: [jira] Created: (LUCENE-1486) Wildcards, ORs etc inside Phrase queries On Thu, Dec 11, 2008 at 11:24 AM, David Kaelbling <[EMAIL PROTECTED]> wrote: > Will https://issues.apache.org/jira/browse/LUCENE-1486 let people > include NOT inside phrases? My customers would like to have queries > like "copyright !mycompany"~2, that find any copyright clause except > their own. MultiPhraseQuery doesn't have that capability, but you could easily handle this specific query with copyright -"copyright mycompany"~2 -Yonik Currently searches like this hit on copyright only if > mycompany doesn't appear anywhere in the document; it ignores the > phrase/proximity requirement. > > Thanks, > David > > -- > David Kaelbling > Senior Software Engineer > Black Duck Software, Inc. > > [EMAIL PROTECTED] > T +1.781.810.2041 > F +1.781.891.5145 > > http://www.blackducksoftware.com > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]