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 EB92CD3CB for ; Wed, 4 Jul 2012 17:06:16 +0000 (UTC) Received: (qmail 14237 invoked by uid 500); 4 Jul 2012 17:06:13 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 14188 invoked by uid 500); 4 Jul 2012 17:06:13 -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 14179 invoked by uid 99); 4 Jul 2012 17:06:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2012 17:06:13 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of alireza.salimi@gmail.com designates 74.125.83.48 as permitted sender) Received: from [74.125.83.48] (HELO mail-ee0-f48.google.com) (74.125.83.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jul 2012 17:06:08 +0000 Received: by eekb45 with SMTP id b45so3541499eek.35 for ; Wed, 04 Jul 2012 10:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=mMPavqPdKWX/P/GDTGGty4+JiQp7nn7LLi3ue76xj2E=; b=Vc74CVRvx4CtbOJyJwC3lJq7yyeBg/ZcLrfAsHGIu1nfTpjcnSEC3ZkvTz3tVa0/UO HpESA1w7DYIRDf4/L7pwOLmxjnesVFhAUGxLHIuDcLylySdwbhWxD+iTxX20LXPLZEDw HBzkX4y3HxkwwbWJiLxuHnUATu4hRmGuQVotcJ0tdP9kufzNFlPLjygpFE+cg23NWvvh DU3Nqnd/4tANEX/Hj48v63MN7Ioroa3NZ89BXkV2kaugMqKq2qlC6hzgDwDH4uR1xuX3 un7eW9jKenrs2hrvyuazc5Gx4BOr1P6q4I/K6+fUv/QoIbL/BsAoiPLydo8Wswp89SSL Ev5A== Received: by 10.14.40.18 with SMTP id e18mr5567651eeb.109.1341421547141; Wed, 04 Jul 2012 10:05:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.193.133 with HTTP; Wed, 4 Jul 2012 10:05:26 -0700 (PDT) In-Reply-To: <8F55A95E5FBE4CF6A84B4BC2B0EF2118@JackKrupansky> References: <8F55A95E5FBE4CF6A84B4BC2B0EF2118@JackKrupansky> From: Alireza Salimi Date: Wed, 4 Jul 2012 13:05:26 -0400 Message-ID: Subject: Re: Synonyms and hyphens To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=bcaec52be5f1cfbb8d04c4040abf X-Virus-Checked: Checked by ClamAV on apache.org --bcaec52be5f1cfbb8d04c4040abf Content-Type: text/plain; charset=ISO-8859-1 Wow, I didn't know that. Is there a way to disable this feature? I mean, is it something coming from the Analyzer? On Wed, Jul 4, 2012 at 12:26 PM, Jack Krupansky wrote: > Terms with embedded special characters are treated as phrases with spaces > in place of the special characters. So, "gb-mb" is treated as if you had > enclosed the term in quotes. > > -- Jack Krupansky > -----Original Message----- From: Alireza Salimi > Sent: Wednesday, July 04, 2012 6:50 AM > To: solr-user@lucene.apache.org > Subject: Re: Synonyms and hyphens > > > Hi, > > Does anybody know why hyphen '-' and q.op=AND causes such a big difference > between the two queries? I thought hyphens are removed by StandardTokenizer > which means theoretically the two queries should be the same! > > Thanks > > On Tue, Jul 3, 2012 at 4:05 PM, Alireza Salimi * > *wrote: > > Hi, >> >> I'm not sure if anybody has experienced this behavior before or not. >> I noticed that 'hyphen' plays a very important role here. >> I used Solr's default example directory. >> >> http://localhost:8983/solr/**select/?q=name:(gb-mb)&** >> version=2.2&start=0&rows=10&**indent=on&debugQuery=on&** >> indent=on&wt=json&q.op=AND >> results in "parsedquery":"+name:gb +name:gib +name:gigabyte >> +name:gigabytes +name:mb +name:mib +name:megabyte +name:megabytes", >> >> While searching http://localhost:8984/solr/** >> select/?q=name:(gbmb)&version=**2.2&start=0&rows=10&indent=on&** >> debugQuery=on&indent=on&wt=**json&q.op=AND >> results in "parsedquery":"+(name:gb name:gib name:gigabyte >> name:gigabytes) +(name:mb name:mib name:megabyte name:megabytes)", >> >> If you notice to the first query - with hyphens - you can see that the >> results of >> parsing is totally different. I know that hyphens are special characters >> in Solr, >> but there's no way that the first query returns any entry because it's >> asking for >> ALL synonyms. >> >> Am I missing something here? >> >> Thanks >> >> >> -- >> Alireza Salimi >> Java EE Developer >> >> >> >> > > -- > Alireza Salimi > Java EE Developer > -- Alireza Salimi Java EE Developer --bcaec52be5f1cfbb8d04c4040abf--