[
https://issues.apache.org/jira/browse/SOLR-2894?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13222450#comment-13222450
]
Dan Cooper commented on SOLR-2894:
----------------------------------
Added a patch to provide distributed pivot faceting. We've been running this
code for a while now and it seems to work OK, also created a unit test to test
distributed pivot faceting on a small set of data.
The patch was created against Solr trunk revision 1297102.
It should perform in much the same way as single shard pivot faceting. It only
sorts by count if you specify that option otherwise it returns results in the
order they were generated (may be useful is performance is important but
ordering is not). Most will want to specify facet.sort=count. This patch also
supports limiting results using facet.limit.
To do the merge I'm converting the NamedList objects that get returned by each
shard in a giant map (should be more efficient for merging the results) and
then converting back into a NamedList when the merge is complete. This merge
should support N depth pivots but I've only properly tested a depth of 2.
I've added some new parameters to support the features we require from pivot
faceting and thought they may as well go in the patch in case others find them
useful.
* facet.pivot.limit.method
** set to 'combined' if you want only the N number of top results to be
returned across all pivots, where N is set by facet.limit. e.g. if you pivoted
by country,manufacturer and limited by 5, obviously the top 5 countries would
be returned, but only the top 5 manufacturers by combined total would be
returned too. e.g. Each country would return the same 5 manufacturers (or less
if no results).
* facet.pivot.limit.ignore
** Ignores the specified field from the limiting operations. e.g. if you
pivoted by country,manufacturer and limited by 5 and set
facet.pivot.limit.ignore=country then you would get all available countries
returned (not limited) but only 5 manufacturers for each country.
Can someone test the patch and give some feedback?
> Implement distributed pivot faceting
> ------------------------------------
>
> Key: SOLR-2894
> URL: https://issues.apache.org/jira/browse/SOLR-2894
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 4.0
> Reporter: Erik Hatcher
> Attachments: distribPatch-05-03-12.txt
>
>
> Following up on SOLR-792, pivot faceting currently only supports
> undistributed mode. Distributed pivot faceting needs to be implemented.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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]