Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 60548 invoked from network); 19 Sep 2008 15:52:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Sep 2008 15:52:47 -0000 Received: (qmail 38833 invoked by uid 500); 19 Sep 2008 15:52:37 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 38805 invoked by uid 500); 19 Sep 2008 15:52:37 -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 38794 invoked by uid 99); 19 Sep 2008 15:52:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2008 08:52:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.222.209.11] (HELO mirkwood.informatics.jax.org) (209.222.209.11) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2008 15:51:37 +0000 Received: from [127.0.0.1] (corona [209.222.209.245]) by mirkwood.informatics.jax.org (8.13.8/8.13.8) with ESMTP id m8JFq7ZF004199 for ; Fri, 19 Sep 2008 11:52:08 -0400 (EDT) (envelope-from mhall@informatics.jax.org) Message-ID: <48D3CAB4.6060208@informatics.jax.org> Date: Fri, 19 Sep 2008 11:52:20 -0400 From: Matthew Hall User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Re: lucene Front-end match References: <9233ccac0809190205u1cfde87eu7bab509dab7193f2@mail.gmail.com> <5FF3185E-1679-45D8-BA5E-27AC4B72AAE6@gmail.com> <9233ccac0809190301m74a4755ewd97f99f28a51f58@mail.gmail.com> <9233ccac0809190844i16173ffdr4ba79217f916ca82@mail.gmail.com> In-Reply-To: <9233ccac0809190844i16173ffdr4ba79217f916ca82@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-PMX-Version: 5.4.3.345767, Antispam-Engine: 2.6.0.325393, Antispam-Data: 2008.9.19.153419 X-PerlMx-Spam: Gauge=IIIIIII, Probability=7%, Report='BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, __BOUNCE_CHALLENGE_SUBJ 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_419_BODY_WEBMAIL 0, __FRAUD_419_WEBMAIL 0, __HAS_MSGID 0, __HIGHBITS 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' X-Virus-Checked: Checked by ClamAV on apache.org The reason the wildcard is being dropped is because you have wrapped it in a phrase query. Wildcards are not supported in Pharse Queries. At least not in any Analyzers that I'm aware of. A really good tool to see the transformations that happen to a query is Luke, open it up against your index, go into the search section, choose the analyzer you use and start playing around. This has helped me countless times when creating I'm my own queries and not getting the results that I expect. -Matt 叶双明 wrote: > I am sorry, just put the string to QueryParser. > But what make me confusing the code: > > Query query = qp.parse("bbb:\"b*\" AND ccc:\"cc*\""); > > doesn't work as i have expected. It drop the Wildcard *. > > > 2008/9/19, 叶双明 : > >> Thanks! >> >> Now, I just use Query query = qp.parse("a*"); and meet the my >> requirements. >> >> Another question: how to parser query string like: title:"The >> Right Way" AND text:go >> please show me in java code. thanks. >> >> 2008/9/19 Karl Wettin >> >> >>> 19 sep 2008 kl. 11.05 skrev 叶双明: >>> >>> Document> >>> >>>> Document> >>>> >>>> How can I get the first Document buy some query string like "a" , "ab" or >>>> "abc" but no "b" and "bc"? >>>> >>>> >>> You would create an ngram filter that create grams from the first position >>> only. Take a look at EdgeNGramTokenFilter in contrib/analyzers. >>> >>> >>> karl >>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org >>> For additional commands, e-mail: java-user-help@lucene.apache.org >>> >>> >>> >> -- >> Sorry for my English!! 明 >> Please help me correct my English expression and error in syntax >> >> > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org