Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 79953 invoked from network); 16 Jun 2004 14:09:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Jun 2004 14:09:12 -0000 Received: (qmail 19150 invoked by uid 500); 16 Jun 2004 14:09:08 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 19017 invoked by uid 500); 16 Jun 2004 14:09:07 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 18379 invoked by uid 99); 16 Jun 2004 14:09:02 -0000 Received: from [143.106.80.3] (HELO apolo.ccuec.unicamp.br) (143.106.80.3) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 16 Jun 2004 07:09:02 -0700 Received: from www.ccuec.unicamp.br (apolo [143.106.80.3]) by apolo.ccuec.unicamp.br (Postfix) with SMTP id 9FF0C33395C for ; Wed, 16 Jun 2004 11:08:47 -0300 (BRT) Received: from 143.106.120.195 (SquirrelMail authenticated user daniel) by www.ccuec.unicamp.br with HTTP; Wed, 16 Jun 2004 11:08:47 -0300 (BRT) Message-ID: <1987.143.106.120.195.1087394927.squirrel@www.ccuec.unicamp.br> In-Reply-To: <097F133D-BF96-11D8-B5A8-000393A564E6@ehatchersolutions.com> References: <2510.143.106.120.195.1087312898.squirrel@www.ccuec.unicamp.br> <1314.143.106.120.195.1087389928.squirrel@www.ccuec.unicamp.br> <097F133D-BF96-11D8-B5A8-000393A564E6@ehatchersolutions.com> Date: Wed, 16 Jun 2004 11:08:47 -0300 (BRT) Subject: Re: How to use PhraseQuery Class? From: "Daniel de Souza Teixeira" To: "Lucene Users List" Reply-To: daniel@ccuec.unicamp.br User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks Erik! Now, it's working. Regards! -- Daniel > On Jun 16, 2004, at 8:45 AM, Daniel de Souza Teixeira wrote: >> Do I need to use some special kind of Analyzer on the index method ? > > What analyzer did you use? SimpleAnalyzer lowercases.... > >> PhraseQuery query = new PhraseQuery(); >> query.setSlop(2); >> query.add(new Term("contents", "How")); >> query.add(new Term("contents", "can")); >> >> System.out.println( "Query: " + query.toString()); >> >> Hits hits = searcher.search(query); > > And so your "How" term should be "how" in order to match what you > indexed. > > Be sure to read and understand issues you can encounter with analysis > in the picture, or in your case in the picture during indexing, but not > during querying: > > http://wiki.apache.org/jakarta-lucene/AnalysisParalysis > > In other words, knowing *exactly* what you indexed is extremely vital > in understanding issues with querying. > > Erik > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: lucene-user-help@jakarta.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org