You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Tim Owen (JIRA)" <ji...@apache.org> on 2018/05/30 14:22:00 UTC

[jira] [Commented] (SOLR-7830) topdocs facet function

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

Tim Owen commented on SOLR-7830:
--------------------------------

I've attached a new patch, I took your original patch and updated it for the 7x branch, then added distributed search support (the merging and re-sorting).

We wanted this functionality as it's really useful to fetch 1 or 2 sample documents with each bucket for some of our use-cases, and this approach of using the topdocs aggregate function works really nicely.

The only limitation is that the sorting for distributed searches can only work with field sorting, not with functional sorting, and you can only sort by fields that are included in the results (otherwise it would need to include the sort values in shard responses - this could be done, but it was more complex and we didn't need that for our use-case). Also, the offset parameter isn't used, but we felt pagination of these topdocs was quite niche (but it could be added to this patch).

> topdocs facet function
> ----------------------
>
>                 Key: SOLR-7830
>                 URL: https://issues.apache.org/jira/browse/SOLR-7830
>             Project: Solr
>          Issue Type: New Feature
>          Components: Facet Module
>            Reporter: Yonik Seeley
>            Priority: Major
>         Attachments: ALT-SOLR-7830.patch, SOLR-7830.patch, SOLR-7830.patch
>
>
> A topdocs() facet function would return the top N documents per facet bucket.
> This would be a big step toward unifying grouping and the new facet module.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org