Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 60189 invoked from network); 12 Aug 2008 08:57:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Aug 2008 08:57:33 -0000 Received: (qmail 33623 invoked by uid 500); 12 Aug 2008 08:57:25 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 33592 invoked by uid 500); 12 Aug 2008 08:57:25 -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 33581 invoked by uid 99); 12 Aug 2008 08:57:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 01:57:25 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of alexander.aristov@gmail.com designates 209.85.200.174 as permitted sender) Received: from [209.85.200.174] (HELO wf-out-1314.google.com) (209.85.200.174) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Aug 2008 08:56:27 +0000 Received: by wf-out-1314.google.com with SMTP id 28so2274599wfc.20 for ; Tue, 12 Aug 2008 01:56:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=72lwu1HQkc+xJAymsSXuIINHBP4QVfhP1MYMExWCc/M=; b=bu2TXvT3yDlErj+0JU2PHONJGIqirwSuhZZkczxf696JXbFKUxLn4l48R+rJjuOqID 8pav69BvfI81AfZdxrV1P51E1BpQ2EshtXzkrG3t+Pj2b+50Yn9EG7Wok/IlHuNzSZ96 sg5AkEX5HWI44r9KzjzpiLyguJGFDZNWlq4t0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=odrZ7lMWH85F2d1DUG5PEeq2QSFojKOZ2U27s4fvZUiiPvWljTE7Zu9V0dGbX+WVON wJVgi+9gxZ371P0RM8mPjxqCh0FGV0QUiY6dW6EbkWrtm47MmZMqa8fUY3nIyfaMXtz/ iDKIOuDnv8Gd/DzRJUzun4o/WlvHxzK3gbsQo= Received: by 10.142.232.20 with SMTP id e20mr2568394wfh.138.1218531415892; Tue, 12 Aug 2008 01:56:55 -0700 (PDT) Received: by 10.143.29.10 with HTTP; Tue, 12 Aug 2008 01:56:55 -0700 (PDT) Message-ID: <11975c90808120156j56f2961bg3f687a635a5da336@mail.gmail.com> Date: Tue, 12 Aug 2008 11:56:55 +0300 From: "Alexander Aristov" To: java-user@lucene.apache.org Subject: Re: Query to ignore certain phrases In-Reply-To: <18935560.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_115967_8751945.1218531415881" References: <18935560.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_115967_8751945.1218531415881 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I think it should look something like this "white house" NOT "russian white house"~1 http://lucene.apache.org/java/docs/queryparsersyntax.html#Escaping%20Special%20Characters Alex On 12/08/2008, Jeff French wrote: > > > We're trying to perform a query where if our intended search term/phrase is > part of a specific larger phrase, we want to ignore that particular match, > but not the entire document (unless of course there are no other hits with > our intended term/phrase). For example, a query like: > > "white house" UNLESS "russian white house" > > should not produce a match on the phrase: > > "russian white house" > > but should match: > > "white house" > > Where this differs from the NOT operator is that we don't want to rule out > a > document just because it contains "russian white house", we just want to > ignore the hit, so that this phrase: > > "... in the russian white house as opposed to the american white house > ..." > > would return the document. > > Can this be accomplished using Lucene or Qsol QueryParser syntax, or do we > need to write something custom? > -- > View this message in context: > http://www.nabble.com/Query-to-ignore-certain-phrases-tp18935560p18935560.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > -- Best Regards Alexander Aristov ------=_Part_115967_8751945.1218531415881--