We have this code in PojoIndexedTypeIndexingPlan:
The if condition is presumably only there for performance, but:
I doubt it improves performance by a lot, since getState( identifier ).updateBecauseOfContained( entitySupplier ); doesn't do much when the state already exists.
I believe it's wrong. If we create a state for some benign change (such as an update to a property that is not indexed), and then end up in this method because a contained entity has changed, then we will skip reindexing.
Add a test for this.
Remove the if to fix the problem.
Maybe, in a follow-up ticket, prevent the creation of a state for updates that are not relevant to indexing?