If the data is from another Solr instance, consider the [subquery] Document Transformer here: https://cwiki.apache.org/confluence/display/solr/Transforming+Result+Documents#TransformingResultDocuments-[subquery]
More broadly, you can write a custom DocTransformer plugin do insert anything you want in the output documents. NOTE: DocTransformer only works on the top N docs being returned, which is what I think you want. IOW, if rows=10 it only "sees" 10 documents even if numFound is millions. Best, Erick On Wed, Feb 1, 2017 at 7:04 AM, Ugo Matrangolo <ugo.matrang...@gmail.com> wrote: > Hi, > > I'm trying to write a SearchComponent that personalizes on the fly a field > on all the docs resulting from the initial search query. > > What I would like to do is to write a SearchComponent that intercepts the > documents belonging to the result sets of a search query and upsert one or > more of their field values with infos retrieved from external svc/logic. > > I can't pre-compute all of these values because they are highly dependant > on the user/context. > > I was wondering if someone here already did something like this and, more > broadly, has some experience in personalizing a search response in the Solr > guts. > > Best > Ugo