| From what I can see in org.hibernate.search.elasticsearch.impl.ElasticsearchHSQueryImpl.IndexSearcher.getFieldValue(EntityIndexBinding, JsonObject, String), when projecting on a field, this field's value is extracted from the "_source" attribute, instead of using Elasticsearch's own projection feature. That last one should be preferred for stored fields, since it will always return the value in the same format, independently of how the value was submitted. For instance, if a date field has the default format (strict_date_optional_time||epoch_millis), and if a document value has been submitted using the epoch format, then the "_source" attribute will contain the value in this epoch format, but when using Elasticsearch's projection feature, we'll still get the value in the strict_date_optional_time format. This issue is not critical, since most of the time, the index content is added by Hibernate Search itself, but it might help in some cases, for instance when users migrate big, old indexes and don't want to reindex everything right away. |