Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 63356 invoked from network); 25 Aug 2008 18:19:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Aug 2008 18:19:37 -0000 Received: (qmail 69202 invoked by uid 500); 25 Aug 2008 18:19:29 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 69170 invoked by uid 500); 25 Aug 2008 18:19:29 -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 69159 invoked by uid 99); 25 Aug 2008 18:19:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Aug 2008 11:19:29 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lucenelist2007@danielnaber.de designates 80.67.18.14 as permitted sender) Received: from [80.67.18.14] (HELO smtprelay02.ispgateway.de) (80.67.18.14) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Aug 2008 18:18:29 +0000 Received: from [212.100.48.190] (helo=dsl48-190.pool.bitel.net) by smtprelay02.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1KXgeW-0001ZU-QB for java-user@lucene.apache.org; Mon, 25 Aug 2008 20:18:56 +0200 From: Daniel Naber To: java-user@lucene.apache.org Subject: Re: MultiPhrase search Date: Mon, 25 Aug 2008 20:19:17 +0200 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200808252019.18264@danielnaber.de> X-Df-Sender: 695637 X-Virus-Checked: Checked by ClamAV on apache.org On Montag, 25. August 2008, Andre Rubin wrote: > I tried it out but with no luck (I think I did it wrong). In any > case, is MultiPhraseQuery what I'm looking for? If it is, how should I > use the MultiPhraseQuery class? No, you won't need it. If you know that the field is not really tokenized (no matter whether by using UN_TOKENIZED or KeywordAnalyzer) you should create a TermQuery directly, without using the QueryParser. The QueryParser interprets AND, OR, and NOT, and a space is just a default for "OR", so using KeywordAnalyzer won't have the desired effect. Regards Daniel -- http://www.danielnaber.de --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org