You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Vishwas Goel <vi...@gmail.com> on 2012/12/26 05:30:34 UTC

Retrieving granular scores back from Lucene/SOLR

Hi,

I am looking to get a bit more information back from SOLR/Lucene about the
query/document pair scores. This would include field level scores, overall
text relevance score, Boost value, BF value etc.

Information could either be encoded in the score itself that Lucene/Solr
returns - ideally however i would want to return an array of scores back
from SOLR/Lucene. I understand that i could work with the debug output -
but i am looking to do this for the production use case.

Has anyone explored something like this? Does someone know, where is the
final score(not just the relevance score) computed?

Thanks,
Vishwas

Re: Retrieving granular scores back from Lucene/SOLR

Posted by Robert Muir <rc...@gmail.com>.
On Wed, Dec 26, 2012 at 6:15 AM, Vishwas Goel <vi...@gmail.com> wrote:

>> Use Scorer.getChildren()/freq()/getWeight()
>>
>> in your collector you can walk the scorer hierarchy, associate scorers
>> with specific terms and queries, and determine which scorers matched
>> which documents and with what subscore.
>>
>
> This seems interesting. Is there any example code that i could look at?
>

No. just look at the individual APIs and put them together.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Retrieving granular scores back from Lucene/SOLR

Posted by Vishwas Goel <vi...@gmail.com>.
On Wed, Dec 26, 2012 at 5:19 PM, Robert Muir <rc...@gmail.com> wrote:

> On Tue, Dec 25, 2012 at 11:30 PM, Vishwas Goel <vi...@gmail.com> wrote:
> > Hi,
> >
> > I am looking to get a bit more information back from SOLR/Lucene about
> the
> > query/document pair scores. This would include field level scores,
> overall
> > text relevance score, Boost value, BF value etc.
>
> Use Scorer.getChildren()/freq()/getWeight()
>
> in your collector you can walk the scorer hierarchy, associate scorers
> with specific terms and queries, and determine which scorers matched
> which documents and with what subscore.
>
>
This seems interesting. Is there any example code that i could look at?

Thanks,
Vishwas



> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Re: Retrieving granular scores back from Lucene/SOLR

Posted by Robert Muir <rc...@gmail.com>.
On Tue, Dec 25, 2012 at 11:30 PM, Vishwas Goel <vi...@gmail.com> wrote:
> Hi,
>
> I am looking to get a bit more information back from SOLR/Lucene about the
> query/document pair scores. This would include field level scores, overall
> text relevance score, Boost value, BF value etc.

Use Scorer.getChildren()/freq()/getWeight()

in your collector you can walk the scorer hierarchy, associate scorers
with specific terms and queries, and determine which scorers matched
which documents and with what subscore.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: Retrieving granular scores back from Lucene/SOLR

Posted by Vishwas Goel <vi...@gmail.com>.
I thought the reason explain was expensive was because of the string
concats. I actually do not want to store this in strings - i just want the
data without the string concats. I have so far not looked at IndexSearcher
- will do.

Other thought i had was to encode 1 such score in the final score(float
value) itself. That way, i do not need to change the function interface.
Thoughts?

Thanks,
Vishwas



On Wed, Dec 26, 2012 at 10:14 AM, Jack Krupansky <ja...@basetechnology.com>wrote:

> The Explanation tree returned by IndexSearcher#explain is as good as you
> are going to get, but is rather expensive. You are asking for a lot, so you
> should be prepared to pay for it.
>
> See:
> http://lucene.apache.org/core/**4_0_0/core/org/apache/lucene/**
> search/IndexSearcher.html#**explain(org.apache.lucene.**search.Query<http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/search/IndexSearcher.html#explain(org.apache.lucene.search.Query>,
> int)
>
> -- Jack Krupansky
>
> -----Original Message----- From: Vishwas Goel
> Sent: Tuesday, December 25, 2012 11:30 PM
> To: java-user@lucene.apache.org
> Subject: Retrieving granular scores back from Lucene/SOLR
>
>
> Hi,
>
> I am looking to get a bit more information back from SOLR/Lucene about the
> query/document pair scores. This would include field level scores, overall
> text relevance score, Boost value, BF value etc.
>
> Information could either be encoded in the score itself that Lucene/Solr
> returns - ideally however i would want to return an array of scores back
> from SOLR/Lucene. I understand that i could work with the debug output -
> but i am looking to do this for the production use case.
>
> Has anyone explored something like this? Does someone know, where is the
> final score(not just the relevance score) computed?
>
> Thanks,
> Vishwas
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.**apache.org<ja...@lucene.apache.org>
> For additional commands, e-mail: java-user-help@lucene.apache.**org<ja...@lucene.apache.org>
>
>

Re: Retrieving granular scores back from Lucene/SOLR

Posted by Jack Krupansky <ja...@basetechnology.com>.
The Explanation tree returned by IndexSearcher#explain is as good as you are 
going to get, but is rather expensive. You are asking for a lot, so you 
should be prepared to pay for it.

See:
http://lucene.apache.org/core/4_0_0/core/org/apache/lucene/search/IndexSearcher.html#explain(org.apache.lucene.search.Query, 
int)

-- Jack Krupansky

-----Original Message----- 
From: Vishwas Goel
Sent: Tuesday, December 25, 2012 11:30 PM
To: java-user@lucene.apache.org
Subject: Retrieving granular scores back from Lucene/SOLR

Hi,

I am looking to get a bit more information back from SOLR/Lucene about the
query/document pair scores. This would include field level scores, overall
text relevance score, Boost value, BF value etc.

Information could either be encoded in the score itself that Lucene/Solr
returns - ideally however i would want to return an array of scores back
from SOLR/Lucene. I understand that i could work with the debug output -
but i am looking to do this for the production use case.

Has anyone explored something like this? Does someone know, where is the
final score(not just the relevance score) computed?

Thanks,
Vishwas 


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org