I confess that I did only minimal googling before composing the below. I would like to be able to insert my own code into Solr to rescore query results. To be more specific, I'd like to send Solr a query in which some additional information is attached to the query. After Solr has done the usual query thing on the base query, I want to run code of mine that rescores (and thus reorders) the results. In SolrCloud, I want my 'improved' scores to be the ones used to create and order the final result set.
Is there a place to put this sort of behavior in the architecture?