Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 41657 invoked from network); 11 Mar 2007 16:13:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Mar 2007 16:13:07 -0000 Received: (qmail 44953 invoked by uid 500); 11 Mar 2007 16:13:10 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 44909 invoked by uid 500); 11 Mar 2007 16:13:10 -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 44898 invoked by uid 99); 11 Mar 2007 16:13:10 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2007 09:13:10 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of erickerickson@gmail.com designates 209.85.132.244 as permitted sender) Received: from [209.85.132.244] (HELO an-out-0708.google.com) (209.85.132.244) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 11 Mar 2007 08:12:59 -0800 Received: by an-out-0708.google.com with SMTP id c3so960332ana for ; Sun, 11 Mar 2007 09:12:38 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=N/aIRl8bxkZBO8zvi+HxRAvNb6XCvK9zhqctYTfedEIiihXPl0skpB73z+FD3MDbiQ8OWi0He6i+yGo23NC9RgQnHS1Ta2WzXm1sKUzB04x2gSlqyK64oWG199igrk1B6Jy05tL+OA2ZsqjOm2SdcPNjuHJMzvLXAn75dCFx5Zc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=oHeEJXnGtpgJma7GXGFoD5SxefK8tkjiA2szKx9YMDl/HPuoVBGt8CC5mb7Fnk23nZzcfFhWDLCuz6lpHFRQ0fie9D0/0dPEdZznWOj9UEva4PeNF5/T60CeS8VaRU/ZLRUHt3G0iyRFPnzAENa3zEq9i+wXq+XOZ1vYa6O0ziM= Received: by 10.114.60.19 with SMTP id i19mr885585waa.1173629557793; Sun, 11 Mar 2007 09:12:37 -0700 (PDT) Received: by 10.114.57.15 with HTTP; Sun, 11 Mar 2007 09:12:37 -0700 (PDT) Message-ID: <359a92830703110912y4271209fn6949f2b9fb135d3@mail.gmail.com> Date: Sun, 11 Mar 2007 12:12:37 -0400 From: "Erick Erickson" To: java-user@lucene.apache.org Subject: Re: Query String for a phrase? In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_20837_10685420.1173629557681" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_20837_10685420.1173629557681 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline It depends upon your analyzer during both index and search operations. WhitespaceAnalyzer would do nothing to your string, and you'd have "jakarta&apache". StandardAnalyzer would give you two terms, "jakarta" and "apache" and at query time this would be either jakarta AND apache or jakarta OR apache, depending on what the default operator is. and phrase search is something else again. that is, a PhraseQuery with the term "jakarta apache" would only match the two words if they were right next to each other. You'll get a lot more and better help if you tell us what analyzers you're using ... Erick On 3/11/07, ruchi thakur wrote: > > am sorry , guess "*" caused confusion. > My question is that, using jakarta&apache am able to search for jakarta > apache, but > was confused as no reference to this query String(jakarta&apache) could > find > anywhere on net. > > So just wanted to make sure if > > jakarta&apache -> jakarta apache > like > "jakarta apache" -> jakarta apache > > ie; jakarta&apache seaches for phrase jakarta apache > Regards, > Ruchi > > > On 3/11/07, Doron Cohen wrote: > > > > "ruchi thakur" wrote on 10/03/2007 19:32:14: > > > > > does that mean* jakarta&apache* should search for * jakartaapache* > > > > I assume '*' here is for emphasizing the query text, - this is somewhat > > confusing because '*' is part of Lucene's query syntax for wildcard > > search. > > To the question - usually no, but it depends. You could write an > analyzer > > that would emit a token jakartaapache for input of jakarta&apache though > > my > > guess is that this is not the case, and jakarta&apache and jakartaapache > > are two distinct words in your index. See the Lucene FAQ, in particular > " > > Why am I getting no hits / incorrect hits?", starting with its > > recommendation to examine query.toString(). > > > > Hope this helps, > > Doron > > > > > But using *jakarta&apache* am able to search for *jakarta apache* , > but > > was > > > confused as no reference to this query String(jakarta&apache) could > find > > > anywhere on net. > > > > > > Regards, > > > Ruchi > > > On 3/8/07, Doron Cohen wrote: > > > > > > > > Most likely the string jakarta&apache is analyzed as a single > word, > > > > both at indexing time and at search time. > > > > > > > > See also "AnalysisParalysis" in Lucene Wiki. > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > > ------=_Part_20837_10685420.1173629557681--