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 azhar2007 <az...@outlook.com> on 2014/04/07 18:29:39 UTC

Ranking code

Hi does anybody know where the ranking code is held. Which file in Solr
stores it the solr schema.xml or solrconfig.xml file?





--
View this message in context: http://lucene.472066.n3.nabble.com/Ranking-code-tp4129664.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Ranking code

Posted by Aman Tandon <am...@gmail.com>.
For the better analysis for ranking of documents, you should need to query
the index with these extra parameters(in bold)
eg...whole_query*&debug=true&wt=xml.*
Copy that xml and and paste it to http://explain.solr.pl/ you can then
easily find out the ranking alalysis in the forms of the pie charts and how
much weight is giving to every parameters in your solr config and in the
query.


On Tue, Apr 8, 2014 at 9:09 PM, Shawn Heisey <so...@elyograg.org> wrote:

> On 4/8/2014 3:55 AM, azhar2007 wrote:
>
>> Im basically trying to understand how results are ranked. Whats the
>> algorithm behind it
>>
>
> If you add a debugQuery parameter to your request, set to true, you will
> see the score calculation for every document included in the response.
>
> This is the default similarity class that Solr uses:
>
> http://lucene.apache.org/core/4_7_0/core/org/apache/lucene/
> search/similarities/DefaultSimilarity.html
>
> Thanks,
> Shawn
>
>

Re: Ranking code

Posted by Shawn Heisey <so...@elyograg.org>.
On 4/8/2014 3:55 AM, azhar2007 wrote:
> Im basically trying to understand how results are ranked. Whats the algorithm behind it

If you add a debugQuery parameter to your request, set to true, you will 
see the score calculation for every document included in the response.

This is the default similarity class that Solr uses:

http://lucene.apache.org/core/4_7_0/core/org/apache/lucene/search/similarities/DefaultSimilarity.html

Thanks,
Shawn


Re: Ranking code

Posted by azhar2007 <az...@outlook.com>.
Im basically trying to understand how results are ranked. Whats the algorithm behind it

--- Original Message ---

From: "Shawn Heisey-4 [via Lucene]" <ml...@n3.nabble.com>
Sent: 7 April 2014 19:24
To: "azhar2007" <az...@outlook.com>
Subject: Re: Ranking code



On 4/7/2014 10:29 AM, azhar2007 wrote:
> Hi does anybody know where the ranking code is held. Which file in Solr
> stores it the solr schema.xml or solrconfig.xml file?

Your question is very generic.  It needs to be more specific -- what are
you actually trying to do?

The generic answer is "both" ... query parameters that affect relevancy
ranking can go in solrconfig.xml or included on an individual query.
You can change which similarity class is used in schema.xml.  The
analysis chain and field parameters you choose can also affect relevancy
ranking, and those live in schema.xml.

https://wiki.apache.org/solr/SchemaXml#Similarity
https://wiki.apache.org/solr/SolrRelevancyFAQ

The actual code is not in either file -- it's in the java source code
files that get compiled into Lucene and Solr.

Thanks,
Shawn





_______________________________________________
If you reply to this email, your message will be added to the discussion below:
http://lucene.472066.n3.nabble.com/Ranking-code-tp4129664p4129688.html

To unsubscribe from Ranking code, visit http://lucene.472066.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4129664&code=YXpoYXIyMDA3QG91dGxvb2suY29tfDQxMjk2NjR8MTIzMzkyMzQ3OQ==




--
View this message in context: http://lucene.472066.n3.nabble.com/Ranking-code-tp4129664p4129820.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Ranking code

Posted by Shawn Heisey <so...@elyograg.org>.
On 4/7/2014 10:29 AM, azhar2007 wrote:
> Hi does anybody know where the ranking code is held. Which file in Solr
> stores it the solr schema.xml or solrconfig.xml file?

Your question is very generic.  It needs to be more specific -- what are 
you actually trying to do?

The generic answer is "both" ... query parameters that affect relevancy 
ranking can go in solrconfig.xml or included on an individual query.  
You can change which similarity class is used in schema.xml.  The 
analysis chain and field parameters you choose can also affect relevancy 
ranking, and those live in schema.xml.

https://wiki.apache.org/solr/SchemaXml#Similarity
https://wiki.apache.org/solr/SolrRelevancyFAQ

The actual code is not in either file -- it's in the java source code 
files that get compiled into Lucene and Solr.

Thanks,
Shawn