timatbw commented on code in PR #2742:
URL: https://github.com/apache/solr/pull/2742#discussion_r1815500548
##########
solr/core/src/java/org/apache/solr/search/facet/FacetParser.java:
##########
@@ -138,21 +139,30 @@ public Object parseFacetOrStat(String key, Object o)
throws SyntaxError {
return parseFacetOrStat(key, type, args);
}
+ public interface ParseHandler {
+ Object doParse(FacetParser<?> parent, String key, Object args) throws
SyntaxError;
Review Comment:
This is already how it is, the calling code allows the parser to return
either a FacetRequest or a AggValueSource hence that Object type was needed
here too. It's not ideal, and perhaps in practice most people will want to
produce a AggValueSource only. Creating new subclasses of FacetRequest outside
the package is harder, and I've not yet looked at how feasible it is to do that
from a plugin (it's not the focus of this issue). But it would be interesting
if eventually you can define custom types of faceting too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]