Hello
This question is a spin off from https://github.com/apache/solr/pull/2742/.
PR#2742 is about deploying custom AggValueSource parsers and invoke it via
{
   type:func,
   func:custom,..
}
The question is, how user can deploy own facet {type:custom}? see
https://solr.apache.org/guide/solr/latest/query-guide/json-facet-api.html#types-of-facets

I see two options:
 - introduce a new extension point: FacetParser it's a kind of sibling for
QParserPlugin. My concerns are: There are some boilerplates around it e.g.
support new tag in solrconfig.xml, then support it in Config API, what
else? Then, it's going to be an extension point for the FacetModule
component, which who knows _will be with us forever_ you know.
 - make some surgery over FacetModule to make it subclassable, i.e. a user
creates a subclass of FacetModule overriding parseFacetOrStat()
<https://github.com/apache/solr/blob/b76a29d17c874806e3b6516810772e2238e93098/solr/core/src/java/org/apache/solr/search/facet/FacetParser.java#L141>
and deploy it via existing plugin/module/configAPI.
Note: the first attempt to make FacetModule subclassable was really scary
https://github.com/apache/solr/pull/2865 the problem deserves more efforts.

Which of these paths would you like to pursue?

-- 
Sincerely yours
Mikhail Khludnev

Reply via email to