I've found that explain flag (that is set via URL) is transferred to org.elasticsearch.search.DefaultSearchContext. I'd like to check this flag in my custom query or custom scorer. I expected that SearchContext will be propagated to a Query, but I didn't found the way how to get it. I only have LeafReaderContext or LeafReader. Is there a way to get Search Context from the custom query or scorer?
Regards,
Vadim Gindin