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 439B917C2E for ; Sat, 21 Feb 2015 14:21:56 +0000 (UTC) Received: (qmail 53682 invoked by uid 500); 21 Feb 2015 14:21:52 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 53608 invoked by uid 500); 21 Feb 2015 14:21:52 -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 53587 invoked by uid 99); 21 Feb 2015 14:21:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Feb 2015 14:21:52 +0000 X-ASF-Spam-Status: No, hits=2.8 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of mkhludnev@griddynamics.com designates 209.85.223.174 as permitted sender) Received: from [209.85.223.174] (HELO mail-ie0-f174.google.com) (209.85.223.174) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 21 Feb 2015 14:21:27 +0000 Received: by iecrl12 with SMTP id rl12so14244640iec.2 for ; Sat, 21 Feb 2015 06:19:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=griddynamics.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=1xiLAbPKD8mxjFvX/zsvqSYvJORjfS9zEGHuM08y9sg=; b=f/p1bYu/L/gpySePIcS2212jAQXYAjtHuX2GHaDp9SkVyMCQfYOovSqwEc2sk6tvtI ZRN/MYaLU40dstiF5tYmNz5HL2J9mmq0Zv4Q3zj3kaRZ2mRr99B9kLkrFSEZdggL4pUa qxBz7zWuK3/s2uDmNKD2XOEBRRSO4TuRBYo6g= 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:from:date :message-id:subject:to:content-type; bh=1xiLAbPKD8mxjFvX/zsvqSYvJORjfS9zEGHuM08y9sg=; b=FYuBX6+HUNWxir2Zew6taiwcIinInaqMciB0KNRq1ynPs32lCSmlne/nWZfB4oxMY/ 9sbVqGJ6YlD+xMKhqxwwUj7DZoR2ANHM4d+2bwauzMn3CDxX17S5VyfPeE1C/5j6Z523 TfRpJ+r0N3EdWtTFvBem7Mb/VuTLpz+L5WDYjTJlcl6cqOOzVLMG0mlf3hDKwTT3Rbs4 oDHhnoMTNxPOt/0agERxNRPLNfVB7q6MsJfmb91FEVSiPOHgTZdIp9eZqP4ILZHr6mUz toU0IOthXSNcHTMcsmLGlNRKOZvvma0STvmOnlCZ3Cg5gDdIzQCyFnRYP5pP2/9KlKrj zh7g== X-Gm-Message-State: ALoCoQnbPSJYC4KupZygmSoqn3xnL1gV+hIOpDgV1QOirrtJKKj5rxnFiT3kzxbqv4kN2wRaPNSP X-Received: by 10.107.7.154 with SMTP id g26mr3465437ioi.64.1424528395641; Sat, 21 Feb 2015 06:19:55 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.78.207 with HTTP; Sat, 21 Feb 2015 06:19:15 -0800 (PST) In-Reply-To: <1424505147199-4187827.post@n3.nabble.com> References: <1424505147199-4187827.post@n3.nabble.com> From: Mikhail Khludnev Date: Sat, 21 Feb 2015 17:19:15 +0300 Message-ID: Subject: Re: Solr synonyms logic To: solr-user Content-Type: multipart/alternative; boundary=001a113f2aa6fec75f050f99dc8d X-Virus-Checked: Checked by ClamAV on apache.org --001a113f2aa6fec75f050f99dc8d Content-Type: text/plain; charset=UTF-8 Hello, usually debugQuery=true output explains a lot of such details. On Sat, Feb 21, 2015 at 10:52 AM, davym wrote: > Hi all, > > I'm querying a recipe database in Solr. By using synonyms, I'm trying to > make my search a little smarter. > > What I'm trying to do here, is that a search for pastry returns all > lasagne, > penne & cannelloni recipes. > However a search for lasagne should only return lasagne recipes. > > In my synonyms.txt, I have these lines: > --------------------- > lasagne,pastry > penne,pastry > cannelloni,pastry > --------------------- > > Filter in my scheme.xml looks like this: > ignoreCase="true" expand="true" > tokenizerFactory="solr.WhitespaceTokenizerFactory" /> > Only in the index analyzer, not in the query. > > When using the Solr analysis tool, I can see that my index for lasagne has > a > synonym pastry and my query only queries lasagne. Same for penne and > cannelloni, they both have the synonym pastry. > > Currently my Solr query for lasagne also returns all penne and cannelloni > recipes. I cannot understand why this is the case. > > Can someone explain this behaviour to me please? > > > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Solr-synonyms-logic-tp4187827.html > Sent from the Solr - User mailing list archive at Nabble.com. > -- Sincerely yours Mikhail Khludnev Principal Engineer, Grid Dynamics --001a113f2aa6fec75f050f99dc8d--