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 sara hajili <ha...@gmail.com> on 2015/09/23 15:53:49 UTC

solr get score of each doc in edis max search and more like this search result

hi all
i wanna to get each doc score in search result + restrict search result to
some doc that their score are above than score that i need (i mean i set
minimum score in search and get doc based on upper than that score)
i need this in normal search with edismax and more like this in pysolr
i undrestand that i can set debug = true
and from search resulrt i get

print(search_result.debug['explain'])

but this explain more and i couldn't get each doc score.
any help ?!
tnx

Re: solr get score of each doc in edis max search and more like this search result

Posted by Walter Underwood <wu...@wunderwood.org>.
You can request the “score” field in the “fl” parameter.

Why do you want to cut off at a particular score value?

Solr scores don’t work like that. They are not absolute relevance scores, they change with each query. There is no such thing as a 100% match or a 50% match.

Setting a lower score limit will almost certainly not do what you want. Because it doesn’t do anything useful.

I recommend reading this document for more info:

https://wiki.apache.org/lucene-java/ScoresAsPercentages <https://wiki.apache.org/lucene-java/ScoresAsPercentages>

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Sep 23, 2015, at 6:53 AM, sara hajili <ha...@gmail.com> wrote:
> 
> hi all
> i wanna to get each doc score in search result + restrict search result to
> some doc that their score are above than score that i need (i mean i set
> minimum score in search and get doc based on upper than that score)
> i need this in normal search with edismax and more like this in pysolr
> i undrestand that i can set debug = true
> and from search resulrt i get
> 
> print(search_result.debug['explain'])
> 
> but this explain more and i couldn't get each doc score.
> any help ?!
> tnx