You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by anuvenk <an...@hotmail.com> on 2007/11/28 18:01:29 UTC

How to Add weightage to results from a certain category

My index data is grouped in to categories. For certain search terms , results
from 'forms' category comes up first. Similar results exist in 'premium
forms' category too..But they are pushed to the bottom of the result set.
But ideally we want the 'premium forms' results to come up first. Any way i
can add more weightage to results from 'premium forms' category?
-- 
View this message in context: http://www.nabble.com/How-to-Add-weightage-to-results-from-a-certain-category-tf4889619.html#a13996017
Sent from the Solr - Dev mailing list archive at Nabble.com.


Re: How to Add weightage to results from a certain category

Posted by anuvenk <an...@hotmail.com>.
That worked. Perfect. thanks.

hossman wrote:
> 
> 
> : I tried bq=resourceType:Premium%20Forms^10. But it didn't make any
> : difference.
> : You can see the results here:
> 
> look at the parsedquery_toString in the debug section of your responses.  
> the space in your value makes it parse as resourceType:Premium 
> text:form^10
> 
> try bq=resourceType:"Premium%20Forms"^10
> 
> 
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Add-weightage-to-results-from-a-certain-category-tf4889619.html#a14016657
Sent from the Solr - Dev mailing list archive at Nabble.com.


Re: How to Add weightage to results from a certain category

Posted by Chris Hostetter <ho...@fucit.org>.
: I tried bq=resourceType:Premium%20Forms^10. But it didn't make any
: difference.
: You can see the results here:

look at the parsedquery_toString in the debug section of your responses.  
the space in your value makes it parse as resourceType:Premium 
text:form^10

try bq=resourceType:"Premium%20Forms"^10




-Hoss


Re: How to Add weightage to results from a certain category

Posted by anuvenk <an...@hotmail.com>.
I tried bq=resourceType:Premium%20Forms^10. But it didn't make any
difference.
You can see the results here:
http://h9.lawinfo.com:8080/solr/select?indent=on&version=2.2&q=ca+incorporation&start=0&rows=10&fl=*%2Cscore&qt=qfacet&wt=standard&debugQuery=on&explainOther=&hl.fl=&bq=resourceType:Premium%20Forms^10

And this is my handler:

<requestHandler name="qfacet" class="solr.DisMaxRequestHandler" >
    <lst name="defaults">
     <str name="echoParams">explicit</str>
     <float name="tie">0.01</float>
     <str name="qf">text^0.8 name^2.0</str>
     <!-- until 3 all should match;4 - 3 shld match; 5 - 4 shld match; 6 - 4
shld match; above 6 - 65% match -->
     <str name="mm">3&lt;-1 4&lt;-1 5&lt;-2 6&lt;65%</str>
     <str name="pf">
         text^0.8 name^2.0
     </str>
     <int name="ps">50</int>
    
     <str name="fl">
             *,score
     </str>  

    </lst>
    <lst name="invariants">
      <!--<str name="facet.field">resourceType</str>
      <str name="facet.field">category</str>
      <str name="facet.field">stateName</str>-->
      <str name="facet.sort">false</str>
      <int name="facet.mincount">1</int>
    </lst>
  </requestHandler>

Any idea why its still not bringing up 'Premium forms' results above all
others?




Yonik Seeley wrote:
> 
> If you are using a standard lucene query, add it as a clause
>   +text:foo category:premium^10
> 
> If you are using dismax, add it via bq (a boosting query)
> bq=category:premium^10
> 
> -Yonik
> 
> On Nov 28, 2007 4:01 PM, anuvenk <an...@hotmail.com> wrote:
>>
>> Hi, Forgive me if this question is silly..did u mean adding the param
>> qf=category:premium forms^10 to the request to solr? Anything else to be
>> added?
>>
>>
>>
>> Yonik Seeley wrote:
>> >
>> > On Nov 28, 2007 12:01 PM, anuvenk <an...@hotmail.com> wrote:
>> >> My index data is grouped in to categories. For certain search terms ,
>> >> results
>> >> from 'forms' category comes up first. Similar results exist in
>> 'premium
>> >> forms' category too..But they are pushed to the bottom of the result
>> set.
>> >> But ideally we want the 'premium forms' results to come up first. Any
>> way
>> >> i
>> >> can add more weightage to results from 'premium forms' category?
>> >
>> > Add an optional boosted clause for docs that match the premium
>> category:
>> > category:premium^10
>> >
>> > -Yonik
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-Add-weightage-to-results-from-a-certain-category-tf4889619.html#a14009866
>>
>> Sent from the Solr - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Add-weightage-to-results-from-a-certain-category-tf4889619.html#a14015101
Sent from the Solr - Dev mailing list archive at Nabble.com.


Re: How to Add weightage to results from a certain category

Posted by Yonik Seeley <yo...@apache.org>.
If you are using a standard lucene query, add it as a clause
  +text:foo category:premium^10

If you are using dismax, add it via bq (a boosting query)
bq=category:premium^10

-Yonik

On Nov 28, 2007 4:01 PM, anuvenk <an...@hotmail.com> wrote:
>
> Hi, Forgive me if this question is silly..did u mean adding the param
> qf=category:premium forms^10 to the request to solr? Anything else to be
> added?
>
>
>
> Yonik Seeley wrote:
> >
> > On Nov 28, 2007 12:01 PM, anuvenk <an...@hotmail.com> wrote:
> >> My index data is grouped in to categories. For certain search terms ,
> >> results
> >> from 'forms' category comes up first. Similar results exist in 'premium
> >> forms' category too..But they are pushed to the bottom of the result set.
> >> But ideally we want the 'premium forms' results to come up first. Any way
> >> i
> >> can add more weightage to results from 'premium forms' category?
> >
> > Add an optional boosted clause for docs that match the premium category:
> > category:premium^10
> >
> > -Yonik
> >
> >
>
> --
> View this message in context: http://www.nabble.com/How-to-Add-weightage-to-results-from-a-certain-category-tf4889619.html#a14009866
>
> Sent from the Solr - Dev mailing list archive at Nabble.com.
>
>

Re: How to Add weightage to results from a certain category

Posted by anuvenk <an...@hotmail.com>.
Hi, Forgive me if this question is silly..did u mean adding the param
qf=category:premium forms^10 to the request to solr? Anything else to be
added?


Yonik Seeley wrote:
> 
> On Nov 28, 2007 12:01 PM, anuvenk <an...@hotmail.com> wrote:
>> My index data is grouped in to categories. For certain search terms ,
>> results
>> from 'forms' category comes up first. Similar results exist in 'premium
>> forms' category too..But they are pushed to the bottom of the result set.
>> But ideally we want the 'premium forms' results to come up first. Any way
>> i
>> can add more weightage to results from 'premium forms' category?
> 
> Add an optional boosted clause for docs that match the premium category:
> category:premium^10
> 
> -Yonik
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-Add-weightage-to-results-from-a-certain-category-tf4889619.html#a14009866
Sent from the Solr - Dev mailing list archive at Nabble.com.


Re: How to Add weightage to results from a certain category

Posted by Yonik Seeley <yo...@apache.org>.
On Nov 28, 2007 12:01 PM, anuvenk <an...@hotmail.com> wrote:
> My index data is grouped in to categories. For certain search terms , results
> from 'forms' category comes up first. Similar results exist in 'premium
> forms' category too..But they are pushed to the bottom of the result set.
> But ideally we want the 'premium forms' results to come up first. Any way i
> can add more weightage to results from 'premium forms' category?

Add an optional boosted clause for docs that match the premium category:
category:premium^10

-Yonik