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 B7426DAE1 for ; Fri, 26 Oct 2012 22:37:54 +0000 (UTC) Received: (qmail 94905 invoked by uid 500); 26 Oct 2012 22:37:52 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 94818 invoked by uid 500); 26 Oct 2012 22:37:52 -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 94810 invoked by uid 99); 26 Oct 2012 22:37:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 22:37:52 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.219.48] (HELO mail-oa0-f48.google.com) (209.85.219.48) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 22:37:43 +0000 Received: by mail-oa0-f48.google.com with SMTP id h2so3719387oag.35 for ; Fri, 26 Oct 2012 15:37:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=Ec6g87EvuhWgffa2jUfof1KdSg2xBEnZLqVdc2n7sdc=; b=QdixEJsDm64OlIxvNzZ6UJ4TojY2oWq0H6A9VG8gde9SKEW/YO+Isq27B7PDfmvYB+ U9eKVFY52Bd6rxtJTMMFqvwmD4xVszygaD0uCWEcGC4jxyyUYEYEBFTZfpnKrQXAxE4h EGfglfq5/UYmXzZ60UTwWm+Lwmd7u7J2rAkEQZ2jkUEYMK2LcLkvZF5UP/8MaTt4hqYf kv/QC40v9fDZnbgz4pbqktvc/SzeVUUMeEYBTx9gbJAfCpM7gY5MBV66XOymp03xsdsQ 8OMhvaQ6AmeKidXvlYq29j+PfE2QWnUEnc7xeMejbbHe+iqESkrenu0eVCCG//tJlyyX 1JVg== MIME-Version: 1.0 Received: by 10.182.245.20 with SMTP id xk20mr19736501obc.89.1351291042353; Fri, 26 Oct 2012 15:37:22 -0700 (PDT) Received: by 10.76.112.16 with HTTP; Fri, 26 Oct 2012 15:37:22 -0700 (PDT) X-Originating-IP: [76.103.244.140] Date: Fri, 26 Oct 2012 15:37:22 -0700 Message-ID: Subject: ComplexPhraseQueryParser and stop words From: Brandon Mintern To: java-user@lucene.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkwjbfd6GvfkoDZsEiZwg6KTSUANDczagTh630qVX3eG9n0RToksOOsXX65JyAKPqlFT1Y1 X-Virus-Checked: Checked by ClamAV on apache.org We recently switched from QueryParser to ComplexPhraseQueryParser (from lucene-queryparser-3.6.0.jar), and we've come across two separate problems. The first is that because it parses quoted expressions twice, it is necessary to double-escape any escaped characters. So if I do not want to allow users to include : in their search, I have to escape it as \:, but when it is in quotes, I have to escape it as \\:, because the first parse will turn \\ into \ and then the second time around will do the proper escape. Likewise, I need to escape \ because it shows up frequently in paths. When not in quotes, this is simply \\. In quotes, it must be \\\\. So that was a minor issue, but we were able to work around it without too much trouble. This next problem, though, does not seem to have an easy answer. Our searches for quoted phrases which include stop words no longer match. If a document contained the phrase "time to leave", only "time" and "leave" get indexed, but their positions are maintained so that a later search for "time to leave" works correctly. With the standard QueryParser, this worked just fine. With the ComplexPhraseQueryParser, it no longer works at all. Searching for time AND leave works, but "time to leave" simply fails. Does anyone know where I should start in solving this issue? Thanks, Brandon --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org