Return-Path: Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: (qmail 16812 invoked from network); 1 Dec 2009 13:21:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Dec 2009 13:21:26 -0000 Received: (qmail 43028 invoked by uid 500); 1 Dec 2009 13:21:24 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 42952 invoked by uid 500); 1 Dec 2009 13:21:23 -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 42940 invoked by uid 99); 1 Dec 2009 13:21:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2009 13:21:23 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of erickerickson@gmail.com designates 74.125.78.25 as permitted sender) Received: from [74.125.78.25] (HELO ey-out-2122.google.com) (74.125.78.25) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Dec 2009 13:21:21 +0000 Received: by ey-out-2122.google.com with SMTP id 22so1328473eye.3 for ; Tue, 01 Dec 2009 05:20:59 -0800 (PST) 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=W6TU2bPg8VeAYxTLo13e9181Ezj1Er1U6ZxeFl53RnI=; b=Bd3gyCvsSymn2ClyB/idJgPaw1wlDMSRhuEJ2A96IDzWKCX76I59vuYw0dXfn8fUUg X1D/eu+slPTj+fQk2YT84O1q33QvqUol+CiWXCEGHiQ3ZQj677efYTG+0FVSqDOARV0x NOSu9TFYro/dJYrMCVR/dQKPtLmpjsACtaR6w= 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=xwIph5dDOps3UUGml73gIPrmeVFyJCqItGvMuHICoMB0meUoqldbgUGYMhC3oHwzvs CiB/BciAz+yjOidD2VHhhBQ8E3/a7I4mrqWM7KTo4hfyVI9NxtlR2lcwQPshl+RcPpna +7xiIDytb9iOjtf/9kz0Baw2rpaUROLCTvjsU= MIME-Version: 1.0 Received: by 10.216.85.138 with SMTP id u10mr1880766wee.185.1259673658749; Tue, 01 Dec 2009 05:20:58 -0800 (PST) In-Reply-To: <26586788.post@talk.nabble.com> References: <22863529.post@talk.nabble.com> <22880202.post@talk.nabble.com> <6C330961-EAEC-4E6A-BB93-E88CB9B84212@ehatchersolutions.com> <241993.58731.qm@web50304.mail.re2.yahoo.com> <26572797.post@talk.nabble.com> <359a92830911300617x1b0e32edwbc4b0821b6b60639@mail.gmail.com> <26586788.post@talk.nabble.com> Date: Tue, 1 Dec 2009 08:20:58 -0500 Message-ID: <359a92830912010520l2b11c2e3x6a535373df061e83@mail.gmail.com> Subject: Re: Phrase Query Issue From: Erick Erickson To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e6dab6fbf675990479aaa0d7 --0016e6dab6fbf675990479aaa0d7 Content-Type: text/plain; charset=ISO-8859-1 Well, I don't think this is done normally. I'm assuming here that you've simplified the example and your *real* requirements aren't quite what you're showing, because what you've described seems really confusing to a user. That said, I don't think SOLR has a way to handle this out-of-the-box. What you're asking for is for the query to search different fields based on the *results* of the parsing. You have to deal with someone searching for "tests" OR "run", which presumably should return anything with "test", "tests", "testing", "run". But should NOT return a doc with only "running" in the title. But to the parser, this starts out as title:(tests run).... So, you really need to see the results of feeding any term through the stemmer. If it comes back the same as what you fed in, go against one field. If it comes back stemmed, go against a different field. You'll probably have to create a custom parser that pre-processes each term and determines which field should be searched, search the SOLR list as creating custom parsers has been discussed before by people more knowledgeable than me... If my assumption that there are parts of this problem that you've simplified is NOT correct, perhaps you could explain the use-case that leads to this requirement.... But if anyone has a better idea, now's the time to speak up . Best Erick On Tue, Dec 1, 2009 at 12:13 AM, ravicv wrote: > > Thanks Erick But their any way to get phrase search and normal search > together. > > for Example if I search for "test" it should only give test result but not > tests.. > And if we search for tests it should give all results matching with > tests(this should include stemmer results also) > > Please clarify me how normally this scenario is implemented? > > I am using field title with text type which contains > SnowballPorterFilterFactory filter. > > And another field title_exact with out SnowballPorterFilterFactory filter. > > Both are copied using copy field. > > > > But as text type is having a SnowballPorterFilterFactory filter it stores > tests as test.So always if I search for "test" tests also will come in my > search result. > Please tell me a way to avoid it. > > Thanks > Ravichandra > -- > View this message in context: > http://old.nabble.com/Phrase-Query-Issue-tp22863529p26586788.html > Sent from the Solr - User mailing list archive at Nabble.com. > > --0016e6dab6fbf675990479aaa0d7--