I don't think you can define docTrasformer in the SolrConfig at the moment, I agree it would be a cool feature.
Maybe one possibility could be to use the update request processors [1], and precompute the fields at index time, it would be more expensive in disk and index time, but then it would simplify the fl logic and also performance at query time. Cheers, Diego [1] https://lucene.apache.org/solr/guide/6_6/update-request-processors.html From: solr-user@lucene.apache.org At: 02/27/18 20:21:08To: solr-user@lucene.apache.org Subject: Defining Document Transformers in Solr Configuration We do quite complex data pulls from a Solr index for subsequent analytics, currently using a home-grown Python API. Queries might include a handful of pseudofields which this API rewrites to an aliased field invoking a Document Transformer in the 'fl' parameter list. For example 'numcites' is transformed to 'fl= ....,numcites:[subquery]&numcites.fl=pmid&numcites.q={!terms f=md_c_pmid v=$row.pmid}&numcites.rows=10&numcites.logParamsList=q',...' What I'd ideally like to be able to do would be have this transformation defined in Solr configuration so that it's not tied to one particular external API - defining a macro, if you will, so that you could supply 'fl='a,b,c,%numcites%,...' in the request and have Solr do the expansion. Is there some way to do this that I've overlooked ? if not, I think it would be a useful new feature. -Simon