You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Dilip.TS" <di...@starmarksv.com> on 2007/09/21 07:10:07 UTC

clarification needed for the Ranking score

Hi,
I need a clarification regarding the SOLR Ranking.


consider the scenario  for searching for courses based on following
relevance:

a.	Courses with the term in the courseTitle, courseTag and in the
courseDescription would appear first
b.	Courses with the term in the courseTitle and in the courseDescription
would appear next
c.	Courses with the term only in the courseTitle appear next.
d.	Courses with the term only in the courseDescription appear next.
e.	Courses with the term only in the courseTag appear last.

 Let me know if my understanding is correct with the following solution

 + (basequery) courseTitle^10000 courseTag^1000 courseDescription^100;
courseTitle asc,  courseDescription asc,courseTag asc;

How do we set the relevancy while performing a search? is there any
configuration to set it in the solrconfig files?
Also how do we set the Term Proximity?
Could you clarify?

Thanks in advance


Regards,
Dilip TS


Re: clarification needed for the Ranking score

Posted by Walter Underwood <wu...@netflix.com>.
This would probably work, but the approach has a subtle flaw.
If a query has one word that matches a lot of titles, but a
phrase that matches a description, the best result will be shown
far too low, after all the titles.

A better approach is to weight the titles a bit higher than the
description, probalby 2X to 10X higher. At Infoseek, we weighted
the title 8X higher. At Inktomi, with a completely different search
engine, we used 7.5X. So I'd start with this:

  courseTitle^8 courseTag^4 courseDescription

Also, I see that you are displaying the titles alphabetically,
so the weights are meaningless. Maybe you should be using LIKE
in MySQL if you want to do set matching and sorting.

wunder

On 9/20/07 10:10 PM, "Dilip.TS" <di...@starmarksv.com> wrote:

> Hi,
> I need a clarification regarding the SOLR Ranking.
> 
> 
> consider the scenario  for searching for courses based on following
> relevance:
> 
> a. Courses with the term in the courseTitle, courseTag and in the
> courseDescription would appear first
> b. Courses with the term in the courseTitle and in the courseDescription
> would appear next
> c. Courses with the term only in the courseTitle appear next.
> d. Courses with the term only in the courseDescription appear next.
> e. Courses with the term only in the courseTag appear last.
> 
>  Let me know if my understanding is correct with the following solution
> 
>  + (basequery) courseTitle^10000 courseTag^1000 courseDescription^100;
> courseTitle asc,  courseDescription asc,courseTag asc;
> 
> How do we set the relevancy while performing a search? is there any
> configuration to set it in the solrconfig files?
> Also how do we set the Term Proximity?
> Could you clarify?
> 
> Thanks in advance
> 
> 
> Regards,
> Dilip TS
> 


RE: clarification needed for the Ranking score

Posted by "Dilip.TS" <di...@starmarksv.com>.
Hi,
  Can we use the ranking as follows when searching the term'Java' present in
different fields as per the relevance scenarios mentioned in the previous
mail.

   q= courseTitle:Java^10000 AND courseTag:Java^1000 AND
courseDescription:Java^100; courseTitle asc, courseDescription asc,
courseTag asc;


-----Original Message-----
From: Dilip.TS [mailto:dilip.ts@starmarksv.com]
Sent: Friday, September 21, 2007 10:40 AM
To: SOLR
Subject: clarification needed for the Ranking score


Hi,
I need a clarification regarding the SOLR Ranking.


consider the scenario  for searching for courses based on following
relevance:

a.	Courses with the term in the courseTitle, courseTag and in the
courseDescription would appear first
b.	Courses with the term in the courseTitle and in the courseDescription
would appear next
c.	Courses with the term only in the courseTitle appear next.
d.	Courses with the term only in the courseDescription appear next.
e.	Courses with the term only in the courseTag appear last.

 Let me know if my understanding is correct with the following solution

 + (basequery) courseTitle^10000 courseTag^1000 courseDescription^100;
courseTitle asc,  courseDescription asc,courseTag asc;

How do we set the relevancy while performing a search? is there any
configuration to set it in the solrconfig files?
Also how do we set the Term Proximity?
Could you clarify?

Thanks in advance


Regards,
Dilip TS