Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 58191 invoked from network); 1 Jul 2006 08:38:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Jul 2006 08:38:01 -0000 Received: (qmail 54244 invoked by uid 500); 1 Jul 2006 08:37:55 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 54216 invoked by uid 500); 1 Jul 2006 08:37:55 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 54205 invoked by uid 99); 1 Jul 2006 08:37:55 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jul 2006 01:37:55 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [194.109.24.37] (HELO smtp-vbr17.xs4all.nl) (194.109.24.37) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Jul 2006 01:37:54 -0700 Received: from k8l.lan (porta.xs4all.nl [80.127.24.69]) by smtp-vbr17.xs4all.nl (8.13.6/8.13.6) with ESMTP id k618bWEx062077 for ; Sat, 1 Jul 2006 10:37:32 +0200 (CEST) (envelope-from paul.elschot@xs4all.nl) From: Paul Elschot To: java-user@lucene.apache.org Subject: Re: Any existing query types that support equivalent of "-not interested" ? Date: Sat, 1 Jul 2006 10:37:31 +0200 User-Agent: KMail/1.8.2 References: <20060630154726.22284.qmail@web26009.mail.ukl.yahoo.com> <200606301922.03113.paul.elschot@xs4all.nl> <44A5AF52.1040604@yahoo.co.uk> In-Reply-To: <44A5AF52.1040604@yahoo.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607011037.31777.paul.elschot@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Saturday 01 July 2006 01:10, markharw00d wrote: > > >Maybe this: > > > >SpanNotQuery(interested, SpanNearQuery(not,interested)) > > > >with a SpanTermQuery for each term? > > > > > > Thanks, Paul. This is working well for me and I can happily use multiple > SpanTermQueries embedded in a SpanOrQuery in place of each of the single > words in your example. I've never tried it myself, so it's good to hear that it actually works... > > SpanNotQuery( > SpanOrQuery(interested,curious...) > SpanNearQuery( > SpanOrQuery(not,wasnt,isnt,...) > SpanOrQuery(interested,curious...) > ) > ) How about sth like this to get rid of the duplicates in there: SpanNotNearQuery(includeSpanQuery, excludeSpanQuery, distance, ordered) ? Writing the SpanScorer for that would be some work, though. Regards, Paul Elschot --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org