On Tue, Feb 27, 2018 at 5:34 PM, Diego Ceccarelli (BLOOMBERG/ LONDON) <
dceccarel...@bloomberg.net> wrote:

> 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.
>

Wouldn't work for my use case - we are taking a field which contains the
IDs of documents which are cited  by the current document and 'inverting'
this to compute the number of documents which cite the current document in
the subquery. Anything precomputed could change as the index is updated.

>
> 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
>
>
>

Reply via email to