[
https://issues.apache.org/jira/browse/SOLR-9643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15579009#comment-15579009
]
Christine Poerschke commented on SOLR-9643:
-------------------------------------------
Let's consider why co-locating documents with the same group works.
The easiest way to co-locate is to have all documents on one shard:
{code}
"shard1" : [ { "family":"A" ... } ... {"family":"N", "state":"nj", ... },
{"family":"N", "state":"ny", ... } ... { "family":"Z" ... } ]
# 26 groups [A ... Z] overall
{code}
Alternatively, across multiple shards, documents with the same group can be
co-located e.g. {{"nj"}} and {{"ny"}} in group/family {{"N"}} on shard2:
{code}
"shard1" : [ { "family":"A" ... } ...
... { "family":"Y" ... } ]
"shard2" : [ { "family":"B" ... } ... {"family":"N", "state":"nj", ... },
{"family":"N", "state":"ny", ... } ... { "family":"Z" ... } ]
# shard1 has 13 groups, shard2 has 13 groups, overall we have 13+13=26 groups
{code}
Lastly, if documents with the same group are _not_ co-located ...
{code}
# documents distributed across (say) two shards with documents in the same
group _not_ co-located on the same shard
"shard1" : [ { "family":"A" ... } ... {"family":"N", "state":"nj", ... } ... {
"family":"Y" ... } ]
"shard2" : [ { "family":"B" ... } ... {"family":"N", "state":"ny", ... } ... {
"family":"Z" ... } ]
# shard1 has 14 groups [A C E G I K M N O Q S U W Y]
# shard2 has 13 groups [B D F H J L N P R T V X Z]
# overall:
# approximate result: shard1 has 14 groups, shard2 has 13 groups, overall we
have approximately 14+13=27 groups
# accurate result: intersect([A C E G I K M N O Q S U W Y],[B D F H J L N P R T
V X Z]) = [A ... Z] = 26 groups
{code}
... then the calculation of accurate group counts would be expensive, requiring
intersection of the {{A...N...Y}} and {{B...N...Z}} lists.
I am not aware of any plans to change the existing behaviour.
> Pagination issue occurs in solr cloud when results are grouped on a field
> -------------------------------------------------------------------------
>
> Key: SOLR-9643
> URL: https://issues.apache.org/jira/browse/SOLR-9643
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrCloud
> Affects Versions: 6.1
> Environment: Solr cloud is deployed on AWS linux server. 4 Solr
> servers and apache zookeeper is setup
> Reporter: Paras Diwan
> Priority: Critical
> Fix For: 6.1.1
>
>
> Either value of ngroups in grouped query is inaccurate or there is some issue
> in returning documents of later pages.
> select?q=*:*&group=true&group.field=family&group.ngroups=true&start=0&group.limit=1
> For above mentioned query i get ngroups = 396324
> but for the same query when i modify start to 396320. it returns 0 docs, an
> empty page.
> Instead the last result is at 386887.
> Please look into this issue or offer some solution
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]