lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <ysee...@gmail.com>
Subject Re: Custom JSON facet functions
Date Tue, 09 Feb 2016 14:25:40 GMT
On Tue, Feb 9, 2016 at 7:10 AM, Markus Jelsma
<markus.jelsma@openindex.io> wrote:
> Hi - i must have missing something but is it possible to declare custom JSON facet functions
in solrconfig.xml? Just like we would do with request handlers or  search components?

Yes, but it will probably change:
https://issues.apache.org/jira/browse/SOLR-7447

So currently, you would register a facet function just like a custom
function (value source),
but just put "_agg" at the end of the name and implement AggValueSource.
So for example, the "sum" facet function is registered as "sum_agg"
and implements AggValueSource (the class is SumAgg)

So if you utilize this, just realize that the mechanism and interfaces
are experimental and subject to change (and probably will change at
some point for this in particular).

-Yonik

Mime
View raw message