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 A72C8C3D0 for ; Mon, 14 May 2012 20:25:39 +0000 (UTC) Received: (qmail 88543 invoked by uid 500); 14 May 2012 20:25:35 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 88463 invoked by uid 500); 14 May 2012 20:25:35 -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 88397 invoked by uid 99); 14 May 2012 20:25:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 May 2012 20:25:35 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (athena.apache.org: transitioning domain of dorgan@donaldorgan.com does not designate 209.85.214.48 as permitted sender) Received: from [209.85.214.48] (HELO mail-bk0-f48.google.com) (209.85.214.48) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 May 2012 20:25:27 +0000 Received: by bkcjf20 with SMTP id jf20so6173186bkc.35 for ; Mon, 14 May 2012 13:25:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:x-gm-message-state; bh=W6r2/wTO0g5o4xxiLR+sOrCxvbvvwrC8XHsgu41am0Y=; b=mVxARVrpLMOt/Qh82ZWi50SekSnS7585Ey2OJ9I4eqh4xEDSnkA+6uhELLMoPOOW44 IJILLMk+rFE1sxkJfukVQm+DcYBeeZgY5le8YsNYmF1GedS80KfSB0miaKEs+OM+t6KV F/n0VaijnB4tBiV0PQPC51p2QIqtyKMWTHrq1mUoEicFVyH4VcoQbf81p1qCdAK+VHt0 K4v7qoWbdET+EqcXF8+zM0JAr8HQX81yGuWU7kqI6XqCW7mbSHigroyLDaYp3X9NWu5a tPKZ0PhZ+za9DizdZsbUc5cJrVroICm0vTZmyUUsWLkAblYpzrCse8bGpIj+lvfe5smK HRUA== MIME-Version: 1.0 Received: by 10.204.145.78 with SMTP id c14mr49996bkv.43.1337027105375; Mon, 14 May 2012 13:25:05 -0700 (PDT) Received: by 10.204.41.207 with HTTP; Mon, 14 May 2012 13:25:05 -0700 (PDT) In-Reply-To: References: <999205A97E704316A9B600160D428558@JackKrupansky> <48D7F0E534B64EC3A681E89F0FF5E7B4@JackKrupansky> <9CB39074198C4B5892BDFD08BEED6467@JackKrupansky> <0ACA723F35F34FABB34BC77671A51D42@JackKrupansky> Date: Mon, 14 May 2012 16:25:05 -0400 Message-ID: Subject: Re: Boosting on field empty or not From: Donald Organ To: solr-user@lucene.apache.org Content-Type: multipart/alternative; boundary=00151759338cabc4a704c004e136 X-Gm-Message-State: ALoCoQla52l28P3fEdgGnRndZUJ+u0rnQxlinM6fSGGi91UQlAJQcjKh940kCwUYYcxQ8vULuZFm X-Virus-Checked: Checked by ClamAV on apache.org --00151759338cabc4a704c004e136 Content-Type: text/plain; charset=ISO-8859-1 I've even tried upping the boost to 10 and the de-boost to 1....but yet its still applying the boost to all the documents returned. So it matter if this is a money field? On Mon, May 14, 2012 at 4:19 PM, Donald Organ wrote: > &q=chairs AND (regularprice:*^5 OR (*:* -regularprice:*)^0.5)&sort=score desc > > > Same effect. > > > On Mon, May 14, 2012 at 4:12 PM, Jack Krupansky wrote: > >> Change the second boost to 0.5 to de-boost doc that are missing the field >> value. You had them the same. >> >> -- Jack Krupansky >> >> -----Original Message----- From: Donald Organ >> Sent: Monday, May 14, 2012 4:01 PM >> To: solr-user@lucene.apache.org >> Subject: Re: Boosting on field empty or not >> >> OK it looks like the query change is working but it looks like it boosting >> everything even documents that have that field empty.... >> >> On Mon, May 14, 2012 at 3:41 PM, Donald Organ > >wrote: >> >> OK i must be missing something: >>> >>> >>> defType=edismax&start=0&rows=**24&facet=true&qf=nameSuggest^**10 >>> name^10 codeTXT^2 description^1 brand_search^0 >>> cat_search^10&spellcheck=true&**spellcheck.collate=true&** >>> spellcheck.q=chairs&facet.**mincount=1&fl=code,score&q=**chairs AND >>> (regularprice:*^5 OR (*:* -regularprice:*)^5)&sort=score desc >>> >>> >>> On Mon, May 14, 2012 at 3:36 PM, Jack Krupansky >> >**wrote: >>> >>> "(*:* -regularprice:*)5" should be "(*:* -regularprice:*)^0.5" - the >>>> missing boost operator. >>>> >>>> -- Jack Krupansky >>>> >>>> -----Original Message----- From: Donald Organ >>>> Sent: Monday, May 14, 2012 3:31 PM >>>> To: solr-user@lucene.apache.org >>>> Subject: Re: Boosting on field empty or not >>>> >>>> Still doesnt appear to be working. Here is the full Query string: >>>> >>>> >>>> defType=edismax&start=0&rows=****24&facet=true&qf=nameSuggest^****10 >>>> name^10 >>>> codeTXT^2 description^1 brand_search^0 >>>> cat_search^10&spellcheck=true&****spellcheck.collate=true&** >>>> spellcheck.q=chairs&facet.****mincount=1&fl=code,score&q=****chairs >>>> AND (regularprice:*^5 OR (*:* -regularprice:*)5) >>>> >>>> >>>> On Mon, May 14, 2012 at 3:28 PM, Jack Krupansky < >>>> jack@basetechnology.com> >>>> **wrote: >>>> >>>> Sorry, make that: >>>> >>>>> >>>>> &q=chairs AND (regularprice:*^5 OR (*:* -regularprice:*)^0.5) >>>>> >>>>> I forgot that pure negative queries are broken again, so you need the >>>>> *:* >>>>> in there. >>>>> >>>>> I noticed that you second boost operator was missing as well. >>>>> >>>>> -- Jack Krupansky >>>>> >>>>> -----Original Message----- From: Donald Organ >>>>> Sent: Monday, May 14, 2012 3:24 PM >>>>> To: solr-user@lucene.apache.org >>>>> Subject: Re: Boosting on field empty or not >>>>> >>>>> OK i just tried: >>>>> >>>>> &q=chairs AND (regularprice:*^5 OR (-regularprice:*)5) >>>>> >>>>> >>>>> And that gives me 0 results >>>>> >>>>> >>>>> On Mon, May 14, 2012 at 2:51 PM, Jack Krupansky < >>>>> jack@basetechnology.com >>>>> >* >>>>> *wrote: >>>>> >>>>> foo AND (field:*^2.0 OR (-field:*)^0.5) >>>>> >>>>> >>>>>> So, if a doc has anything in the field, it gets boosted, and if the >>>>>> doc >>>>>> does not have anything in the field, de-boost it. Choose the boost >>>>>> factors >>>>>> to suit your desired boosting effect. >>>>>> >>>>>> -- Jack Krupansky >>>>>> >>>>>> -----Original Message----- From: Donald Organ >>>>>> Sent: Monday, May 14, 2012 2:38 PM >>>>>> To: solr-user@lucene.apache.org >>>>>> Subject: Re: Boosting on field empty or not >>>>>> >>>>>> OK maybe i need to describe this a little more. >>>>>> >>>>>> Basically I want documents that have a given field populated to have a >>>>>> higher score than the documents that dont. So if you search for foo I >>>>>> want >>>>>> documents that contain foo, but i want the documents that have field a >>>>>> populated to have a higher score... >>>>>> >>>>>> Is there a way to do this? >>>>>> >>>>>> >>>>>> >>>>>> On Mon, May 14, 2012 at 2:22 PM, Jack Krupansky < >>>>>> jack@basetechnology.com >>>>>> >* >>>>>> *wrote: >>>>>> >>>>>> In a query or filter query you can write +field:* to require that a >>>>>> field >>>>>> >>>>>> be populated or +(-field:*) to require that it not be populated >>>>>> >>>>>>> >>>>>>> -- Jack Krupansky >>>>>>> >>>>>>> -----Original Message----- From: Donald Organ >>>>>>> Sent: Monday, May 14, 2012 2:10 PM >>>>>>> To: solr-user >>>>>>> Subject: Boosting on field empty or not >>>>>>> >>>>>>> Is there a way to boost a document based on whether the field is >>>>>>> empty >>>>>>> or >>>>>>> not. I am looking to boost documents that have a specific field >>>>>>> populated. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > --00151759338cabc4a704c004e136--