My name is Ethan Roseman, and I'm a developer at Basis Technology. We work on an Elasticsearch plugin that integrates our product, RNI (https://www.basistech.com/text-analytics/rosette/name-indexer/).
With our plugin, we define a custom ScoreFunction in which we have previously used the SearchContext to get at the TopDocs from the query. We look at the raw Lucene scores from the TopDocs.scoreDocs to see whether the document scored above a certain threshold value, as our score function is computationally expensive, and we have implemented measures to not rescore documents that do not look promising to boost performance.
Now that SearchContext.current is gone as of 5.1.1, we are looking for a new way to access the raw Lucene scores from ES in our ScoreFunction / LeafScoreFunction. Is the only way to do this through SearchContext, which is no longer accessible to us?