From java-user-return-53154-apmail-lucene-java-user-archive=lucene.apache.org@lucene.apache.org Thu Jul 5 13:02:28 2012 Return-Path: X-Original-To: apmail-lucene-java-user-archive@www.apache.org Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A52DD0E3 for ; Thu, 5 Jul 2012 13:02:28 +0000 (UTC) Received: (qmail 58932 invoked by uid 500); 5 Jul 2012 13:02:26 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 58714 invoked by uid 500); 5 Jul 2012 13:02:20 -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 58683 invoked by uid 99); 5 Jul 2012 13:02:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 13:02:19 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of itsadok@gmail.com designates 209.85.217.176 as permitted sender) Received: from [209.85.217.176] (HELO mail-lb0-f176.google.com) (209.85.217.176) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jul 2012 13:02:11 +0000 Received: by lboj14 with SMTP id j14so13772313lbo.35 for ; Thu, 05 Jul 2012 06:01:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5kGEmhCF01yKgBuEOUpT5f1FaVQMGIlK0ViKN1gv1X8=; b=mRH7G3R2x1O2SjnQfQIM6FRTSmjWC+G3Eu00plCl5GO/y5SynGDhJxF6wb55H8omYV uj2j/DOzhEXYdxBdzaT39z/9oxHrLKGV842XaT+gqSzCqgHMKWnjZvKHVOF3Uo0AgZQT NKSd/tGKOaPMDSkjl7kPpUgt+L/xFYRSv4ZWkd/8VMjo8X56lRWYiQXxawYCnAVUeAB2 PwIkuDIk0Uc3hAmb87LolN5g3MmoMml6TwkaNf0Ww606gl90icRIWJETNcSwr6naDnjZ W8CH4433Xnt/ZbPAxawlOP8P/Uiy2h3lPF0z2eYTaYllU6h2ABwomSQMfliIn7KXnnDa GB0w== MIME-Version: 1.0 Received: by 10.152.103.109 with SMTP id fv13mr25952005lab.33.1341493310893; Thu, 05 Jul 2012 06:01:50 -0700 (PDT) Received: by 10.114.58.141 with HTTP; Thu, 5 Jul 2012 06:01:50 -0700 (PDT) Received: by 10.114.58.141 with HTTP; Thu, 5 Jul 2012 06:01:50 -0700 (PDT) In-Reply-To: References: Date: Thu, 5 Jul 2012 16:01:50 +0300 Message-ID: Subject: Re: QueryParser, double quotes and wilcard inside the double quotes From: Israel Tsadok To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=f46d040890c743afdd04c414c055 --f46d040890c743afdd04c414c055 Content-Type: text/plain; charset=ISO-8859-1 A hacky trick I used was put a stop weird instead of the asterisk. If you search for "foo a test" and use an analyzer that includes a stop filter (like StandardAnalyzer does), it will match docs 1 and 2. On Jul 4, 2012 10:13 AM, "Jochen Hebbrecht" wrote: > > Thanks Ian, I'll give it a try! > > 2012/7/3 Ian Lea > > > You can use the QueryParser proximity feature e.g. "foo test"~n where > > n is the max distance you want them to be apart. Or look at the > > SpanQuery stuff e.g. SpanNearQuery. > > > > > > -- > > Ian. > > > > > > On Tue, Jul 3, 2012 at 4:59 PM, Jochen Hebbrecht > > wrote: > > > Hi all, > > > > > > Imagine you have the following books which are indexed using Lucene > > > > > > book1 -> title: "foo bar test" > > > book2 -> title: "foo barrr test" > > > book3 -> title: "foo bar bar" > > > > > > I want to find book1 and book2 using the following query "foo * test". > > But > > > if I pass this string to the QueryParser, the QueryParser seems to be > > > searching for a literal '*' character. > > > Any idea's how to fix this? > > > > > > Thanks! > > > Jochen > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org > > > > --f46d040890c743afdd04c414c055--