[ https://issues.apache.org/jira/browse/SOLR-7830?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley updated SOLR-7830: ------------------------------- Attachment: SOLR-7830.patch Here's a draft patch - no distributed merging code yet. This is the first facet function / aggregation that supports JSON rather than just function query notation. The query parameters are taken from the JSON Request API: http://yonik.com/solr-json-request-api/ // retrieve the top document per facet bucket based on another lucene query top : { topdocs : "another_lucene_query" } // retrieve the top document per facet bucket based on the main query & sort top : "topdocs()" // A bigger example using all of the supported args: {code} top : { type : topdocs, query : "another_lucene_query", offset : 0, limit : 5, sort : "field_i desc", fields : "id,*_s,custom_val:add(field1,field2)" } {code} > 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 > Attachments: 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 (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org