Get explain flag value in a custom query/scorer

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

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.