| Currently projecting an unstored fields works Elasticsearch, because we use the "_source" for extracting the results anyway. So the field storage is never used, actually. See
HSEARCH-2358 Closed for details. Anyway, I think we should enforce storing those fields, be it only to shield us from a future issue with the current retrieval method, that would force us to do it the "right" way. A test case is provided in org.hibernate.search.test.query.ProjectionQueryTest (which is being adapted to work on Elasticsearch as part of
HSEARCH-2393 In Progress ). |