[ 
https://issues.apache.org/jira/browse/SOLR-2066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13105460#comment-13105460
 ] 

Martijn van Groningen commented on SOLR-2066:
---------------------------------------------

{quote}
Martijn, would group.truncate be something that can also be added in with the 
same restrictions as group.ngroups (documents within the same group must reside 
on the same shard)? Would this be particularly tricky to add to the patch? It 
would definitely be nice to have, as people seem to rather care a lot about 
exact facet counts.
{quote}
No that is not that difficult. I was planning on adding it anyway.

{quote}
I took a quick peek at this, and I see some changes to how distrib search works 
(ShardRequestFactory).
Could you give a brief explanation about the need for that and how it works? 
Maybe changes like this should be in their own issue so it's easy to tell other 
refactoring vs what's needed just for grouping.
{quote}
Sure! In the initial versions of the patch most of the code was in the 
QueryComponent. The class became very large and I found it very difficult to 
change / maintain. So I decided to move responsibilities to behind interfaces 
and have different concrete implementations for different behavior. During 
coding I also noticed that a few concepts (like ShardRequestFactory, 
ShardResponseProcessor and ShardResultTransformer) are very useable for non 
grouping distributed search. I chose not to refactor the current regular 
distributed grouping, because otherwise this patch becomes to large. I think 
after this is committed that we should refactor the non grouped distributed 
search to use these concepts or similar.
Currently the regular distributed search implementation hasn't changed. 

Concepts that can also be used for non grouped distributed searches:
* ShardRequestFactory is responsible for creating requests to shards in the 
cluster based on the incoming request from the client. 
* ShardResultTransformer. Transforming a NamedList response from the client in 
for example SearchGroup or TopDocs instance.
* ShardResponseProcessor. Basically merges the shard responses. The 
ShardReponseProcessor uses a ShardResultTransformer to transform the shard 
response into a native structure (SearchGroup / TopGroups).

Grouping related concepts:
* EndResultTransformer. Basically form the end result structure. There're three 
implementations for grouped, simple and main results.
* Command. Same responsibility as in Grouping.Command. Currently more focussed 
on distributed search.


> Search Grouping: support distributed search
> -------------------------------------------
>
>                 Key: SOLR-2066
>                 URL: https://issues.apache.org/jira/browse/SOLR-2066
>             Project: Solr
>          Issue Type: Sub-task
>            Reporter: Yonik Seeley
>             Fix For: 3.5, 4.0
>
>         Attachments: SOLR-2066.patch, SOLR-2066.patch, SOLR-2066.patch, 
> SOLR-2066.patch, SOLR-2066.patch, SOLR-2066.patch, SOLR-2066.patch, 
> SOLR-2066.patch, SOLR-2066.patch, SOLR-2066.patch, SOLR-2066.patch, 
> SOLR-2066.patch, SOLR-2066.patch
>
>
> Support distributed field collapsing / search grouping.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to