Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0689C18879 for ; Wed, 13 Jan 2016 17:05:57 +0000 (UTC) Received: (qmail 42676 invoked by uid 500); 13 Jan 2016 17:05:54 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 42605 invoked by uid 500); 13 Jan 2016 17:05:54 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 42588 invoked by uid 99); 13 Jan 2016 17:05:53 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Jan 2016 17:05:53 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3FA2E180574 for ; Wed, 13 Jan 2016 17:05:53 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.212 X-Spam-Level: * X-Spam-Status: No, score=1.212 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id MVaL4yLbAxU3 for ; Wed, 13 Jan 2016 17:05:46 +0000 (UTC) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com [209.85.223.173]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 7B54731AC4 for ; Wed, 13 Jan 2016 17:05:45 +0000 (UTC) Received: by mail-io0-f173.google.com with SMTP id 1so377855465ion.1 for ; Wed, 13 Jan 2016 09:05:45 -0800 (PST) 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=HyISEt7Vk6ty6Gn3yPgdwkk+LTLtQkLuQNxx3vXZ8BQ=; b=o4i8gNSyefL7aJ9eocxfiKGvbP3QqJZobzR3ON7fO5chznG1p/bglZ5G0WJUV7bnfu IrcefaU2UsjVHhFVhyoXkh/96nWeDr5j8M/8SUhFWn765VHrVCB0/44xPcM+85rNtrN7 ZaaVpUNl+0gerCNDY+boqls+k4HkpaUfeil+3h4heydR45HKYrnXm3QNdDUG5VH0/HPb kMx1t46IK5XeCuSY3bWUnM1spLgmplmwazyuwEsB4nTEV104wzhO9O/8RD8cuPlfL66b oDbblBRajWBSGFcQkQpxyRlWP/+IwyvHuNo+5oH9U/l8Lx0ZSZmu/vVKa9w+l7psCQRA Qf8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=HyISEt7Vk6ty6Gn3yPgdwkk+LTLtQkLuQNxx3vXZ8BQ=; b=U+dHm3JtyNsdVe2Hvt/kwQj4OuBdy83rhYYtCA9NqpN8Yj3+gfMhBqP7zTL9kjVGcy qu5Z4rCGayOTPQ5XekuqnhHcCE3GwAF2gyPsS1Cp12qP89v2EBGgWZ3zCwpyeaWeutqd 9luPjhx//kRRIgLQ+GXP/czsBjgqVOsevjw5LLE+YlIWqB5VRYZOiBQTTAovSIRl3ChF S4L5lBUylGioc2c03PTk3YMNH+K+7h5FL+2Od2qyfIYHGdcMQiXAXkccBLmw/br2Hezo ImVYh8kl0IO+Oj5FihrwlzIOdkPQ8KCZgjWVe+OhvW/LSC1keIQBWc9FDx0MNnuoBXe7 1HRA== X-Gm-Message-State: ALoCoQkLMYCF9VBH4Smt2U7j3BPtzVzLLqyD77/o0xZspNYWHsxE00GQ/q8g3Zq/j6zuJBXBKtINDrPZaXKq4KCA49yR8vXQtQ== MIME-Version: 1.0 X-Received: by 10.107.135.23 with SMTP id j23mr105200694iod.50.1452704744423; Wed, 13 Jan 2016 09:05:44 -0800 (PST) Received: by 10.107.53.197 with HTTP; Wed, 13 Jan 2016 09:05:44 -0800 (PST) In-Reply-To: References: <1452684113400-4250402.post@n3.nabble.com> <1452684479443-4250405.post@n3.nabble.com> Date: Wed, 13 Jan 2016 09:05:44 -0800 Message-ID: Subject: Re: How to achieve exact string match query which includes spaces and quotes From: Erick Erickson To: solr-user Content-Type: text/plain; charset=UTF-8 what _does_ matter is getting all that through the parser which means you have to enclose things in quotes and escape them. For instance, consider this query stringFIeld:abc "i am not" this will get parsed as stringField:abc defaultTextField:"i am not". To get around this you need to make sure the entire search gets through the parser as a _single_ token by enclosing in quotes. But then of course you have confusion because you have quotes in your search term so you need to escape those, something like stringField:"abc \"i am not\"" Here's a list for Lucene 5 https://lucene.apache.org/core/5_1_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#Escaping_Special_Characters Best, Erick On Wed, Jan 13, 2016 at 3:39 AM, Binoy Dalal wrote: > No. > > On Wed, 13 Jan 2016, 16:58 Alok Bhandari > wrote: > >> Hi Binoy thanks. >> >> But does it matter which query-parser I use , shall I use "lucene" parser >> or >> "edismax" parser. >> >> >> >> -- >> View this message in context: >> http://lucene.472066.n3.nabble.com/How-to-achieve-exact-string-match-query-which-includes-spaces-and-quotes-tp4250402p4250405.html >> Sent from the Solr - User mailing list archive at Nabble.com. >> > -- > Regards, > Binoy Dalal