| Florian Courtial Right... That's because Hibrnate Search, by default, will optimize reindexing, and will only reindex if a JPA property that is annotated with @Field is dirty. To solve this, you could either:
- annotate your new getter as @javax.persistence.Transient, as @Sanne wisely suggested: it will disable this state inspection optimizations altogether, and will make sure your entity is reindexed whenever a property that is not directly indexed (such as myDate) changed.
- (maybe) add a dummy field with a custom, no-op field bridge directly on the myDate property, so that a change in myDate will trigger a reindexing. I haven't tested that, though: you may run into trouble.
And yes, Elasticsearch 5.0.1 got a fix but we'd rather need a 2.4.2, since Elasticsearch 5 introduces several major breaking changes, and we're not sure we'll be able to migrate in time for the 5.6.0.CR1 (see
HSEARCH-2434 In Progress ) |