You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Yonik Seeley (JIRA)" <ji...@apache.org> on 2015/09/17 17:56:04 UTC
[jira] [Updated] (SOLR-7830) topdocs facet function
[ 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org