In theory you should be able to expose such information through the context passed to e.g. ElasticsearchSearchProjection#request, because we have access to the scope in the implementation of the root context: org.hibernate.search.backend.elasticsearch.search.query.impl.ElasticsearchSearchQueryRequestContext#scope. Now the question is how to do this cleanly 🙂 |