timatbw commented on PR #2742: URL: https://github.com/apache/solr/pull/2742#issuecomment-2456921063
Good points, yes I did notice that the parent parser would not be available via the simple localParams approach, but I didn't realise that SolrParams only support String values not arbitrary nested objects (that's a shame). For my use-cases, I'm OK with just the String-typed map and no need for the parent parser, but I guess a more general solution could support those as well. The solution I had been working on before I found `type:func` was to add a 2nd `AggValueSource parse(FacetParser parent, Object args)` method to `ValueSourceParser` (with a default returning null), and then in FacetParser after the switch cases, do a `getSolrRequest().getCore().getValueSourceParser(type)` and if there's one, call the new method and use that as the return value. That ended up being fairly minimal changes. -- 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]
