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 "alessandro.benedetti" <ab...@apache.org> on 2017/01/27 10:43:51 UTC

Distributed IDF in inter collections distributed queries

Hi all,
I was playing a bit with the distributed IDF, I debugged and explored a lot
the code and it is a nice feature in a shared environment.

I tried to see what is the behaviour in case we run a distributed query
across collections ( ...&collection=a,b,c)

Distributed IDF should work in this scenario as well, and the
DocumentFrequency calculated should reasonably involve a max doc count which
is the total count across all the shards of all the collections.

Using the ExactStats cache, the global collection stats are properly
calculated ( debugging I see the global stats to be coherent with what I
expect).

But this stats are lost and BM25 then uses the local stats ( with the
consequences we know).

I will continue my investigations, has anyone faced this problem before ?

Solr version I am trying is 6.3.0 .


Cheers



--
View this message in context: http://lucene.472066.n3.nabble.com/Distributed-IDF-in-inter-collections-distributed-queries-tp4317519.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Distributed IDF in inter collections distributed queries

Posted by "alessandro.benedetti" <ab...@apache.org>.
Thanks Markus, I commented the Jira issue with a very naive approach to solve
that.
It's a shot in the dark, I will double check if it makes sense at all :)

Cheers



--
View this message in context: http://lucene.472066.n3.nabble.com/Distributed-IDF-in-inter-collections-distributed-queries-tp4317519p4317535.html
Sent from the Solr - User mailing list archive at Nabble.com.

RE: Distributed IDF in inter collections distributed queries

Posted by Markus Jelsma <ma...@openindex.io>.
On 1), https://issues.apache.org/jira/browse/SOLR-7759

 
 
-----Original message-----
> From:alessandro.benedetti <ab...@apache.org>
> Sent: Friday 27th January 2017 13:22
> To: solr-user@lucene.apache.org
> Subject: Re: Distributed IDF in inter collections distributed queries
> 
> I have an update on this, I have identified at least 2 bugs :
> 
> 1) Real score / Debug score is not aligned
> When we operate a shard request with purpose '16388' (
> GET_TOP_IDS,SET_TERM_STATS) we correctly pass the global collection stats
> and we calculate the real score.
> 
> When we operate a shard request with purpose '320' ( GET_FIELDS,GET_DEBUG )
> we don't pass the global collection stats so the debug score calculus and
> rendering is not the same as the real score. 
> This can be really confusing and not easy to spot.
> 
> Proposed solution : we pass the global stats for debugging as well
> 
> 2) Using the ExactStatCache in a solo collection VS multi collection
> scenario doesn't work really well with caching.
> Specifically if we first execute the multi collection query, the global
> stats cached will be the multi collections one, even if we then operate a
> single collection query.
> Vice versa applies.
> 
> Proposed solution : the list of collections involved in the ExactStatsCache
> should be affecting the hashing ( and consequent caching of the same global
> stats)
> 
> I think we should raise 2 separate bugs in the Solr Jira.
> 
> What do you think ?
> 
> 
> 
> 
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Distributed-IDF-in-inter-collections-distributed-queries-tp4317519p4317531.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 

Re: Distributed IDF in inter collections distributed queries

Posted by "alessandro.benedetti" <ab...@apache.org>.
I have an update on this, I have identified at least 2 bugs :

1) Real score / Debug score is not aligned
When we operate a shard request with purpose '16388' (
GET_TOP_IDS,SET_TERM_STATS) we correctly pass the global collection stats
and we calculate the real score.

When we operate a shard request with purpose '320' ( GET_FIELDS,GET_DEBUG )
we don't pass the global collection stats so the debug score calculus and
rendering is not the same as the real score. 
This can be really confusing and not easy to spot.

Proposed solution : we pass the global stats for debugging as well

2) Using the ExactStatCache in a solo collection VS multi collection
scenario doesn't work really well with caching.
Specifically if we first execute the multi collection query, the global
stats cached will be the multi collections one, even if we then operate a
single collection query.
Vice versa applies.

Proposed solution : the list of collections involved in the ExactStatsCache
should be affecting the hashing ( and consequent caching of the same global
stats)

I think we should raise 2 separate bugs in the Solr Jira.

What do you think ?




--
View this message in context: http://lucene.472066.n3.nabble.com/Distributed-IDF-in-inter-collections-distributed-queries-tp4317519p4317531.html
Sent from the Solr - User mailing list archive at Nabble.com.