Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 37530 invoked from network); 23 Mar 2010 14:25:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Mar 2010 14:25:22 -0000 Received: (qmail 11276 invoked by uid 500); 23 Mar 2010 14:25:20 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 11247 invoked by uid 500); 23 Mar 2010 14:25:20 -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 11238 invoked by uid 99); 23 Mar 2010 14:25:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 14:25:20 +0000 X-ASF-Spam-Status: No, hits=4.7 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 209.85.160.176 as permitted sender) Received: from [209.85.160.176] (HELO mail-gy0-f176.google.com) (209.85.160.176) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 14:25:13 +0000 Received: by gyd8 with SMTP id 8so3246499gyd.35 for ; Tue, 23 Mar 2010 07:24:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=IbC1dBRlLqvK3uwGupkjkgyYmf8qp2Hr1Qj2Fc8wGw0=; b=O3eO3QVpfId4q1lhqx9mIgVnQTrCoYhAA8/+lzWnkTD4T03BUgHIFs4In8cS/Ycp0s PsjSVcOPKenfR6xwTO8ZDKCIKai5o4N8mDe75zuF8/hK4ddo873H358Q3dy0wq6nPb5S OJxLvuBRcQyw5gpQL+R9AyoLlvTFMuWVa5Mns= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=dz9JZEFxGMrd+kWGYOnSXA7pCWzlj4XkaWcIrXuMveAqjdgV4IU3KNTn+HAkZtECOF 7hdfN2UwXz1kVxmoe//WvGu3nxUoeZklDntRsWBE+B+mDc0pLRk8KcEUvqJts7bvv7g5 mVj+xUuqNT6PkqUsNJOzFS4DbzmdjLVFKRdRo= MIME-Version: 1.0 Received: by 10.151.88.21 with SMTP id q21mr3115912ybl.199.1269354292292; Tue, 23 Mar 2010 07:24:52 -0700 (PDT) In-Reply-To: <0D7108486FA593428A9C61E87ABB0BB6056FE202@STRANGELOVE.mtvn.ad.viacom.com> References: <428962.4235.qm@web52903.mail.re2.yahoo.com> <0D7108486FA593428A9C61E87ABB0BB6056FE202@STRANGELOVE.mtvn.ad.viacom.com> Date: Tue, 23 Mar 2010 10:24:52 -0400 Message-ID: <359a92831003230724t50af5c8exe7d98290db172a08@mail.gmail.com> Subject: Re: Perfect Match From: Erick Erickson To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=000e0cd6668aafae8e0482789320 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd6668aafae8e0482789320 Content-Type: text/plain; charset=ISO-8859-1 What Ahmet was getting to was that you need parentheses to insure that all your terms go against the artist_s field. Something like artist_s:(Dora The Explorer). But watch capitalization. Adding debugQuery=on to your query will show you a lot about what's going on. HTH Erick On Tue, Mar 23, 2010 at 9:59 AM, Nair, Manas wrote: > Thankyou Ahmet. You were right. artist_s:Dora is bringing results. > But I need artist_s:Dora the explorer to bring only those results which > contain "Dora the explorer". > > I tried to give artist_s:"Dora the explorer" (phrase search).. that is > working. But artist_s:Dora the explorer is not working. Any way to make this > artist_s:Dora the explorer to return results that contain this in them. > > Thanks. > > ________________________________ > > From: Ahmet Arslan [mailto:iorixxx@yahoo.com] > Sent: Tue 3/23/2010 9:32 AM > To: solr-user@lucene.apache.org > Subject: Re: Perfect Match > > > > > > I need help on one of my issues with perfect matching of > > terms. > > > > I have a collection of artists which are stored in the > > index against the field name artist_t which is a text type > > field. This field consists of values like ["dora", Dora The > > Explorer", "Princess Dora The explorer"] across various docs > > as in > > > > > > Dora > > > > > > Dora The > > Explorer > > > > > > Princess Dora The > > Explorer > > > > > > I am searching specifically on artist_t like > > q=artist_t:Dora. > > What I need is the one document which matches exactly with > > Dora, ie. the first doc. "Dora the Explorer" and "Princess > > Dora The Explorer" should not come along with it. > > > > But I am getting all the above. > > > > To tackle this problem, I tried to copyfield this artist_t > > to a new field called artist_s which is of type string and > > indexed the content again. But this approach also doesnt > > help. > > with type="string" &q=artist_s:Dora should return only > > Dora > > > > I tried to create a new field type with Keyword Tokenizer. > > and tried to create a field of that type and copied artist_t > > to this field. That also doesnt work. > > May be you have trailing white-spaces in your artists? Can you try with > adding TrimFilterFactory after KeywordTokenizerFactory? > > > Is there any way of doing this?? > > > > I need exact match ie. if I search for artist_t:Dora The > > Explorer, I should get only the second doc and not the third > > one(Princess Dora The Explorer). > > Note that q=artist_t:Dora The Explorer is parsed into artist_t:Dora > defaultField:The defaultField:Explorer > > Can you do your tests with &q=artist_s:Dora? > > > > > > --000e0cd6668aafae8e0482789320--