|
I am wondering, what triggers the DocumentPopulator to be executed. I created some tests and these are my observations: Test 1:
EclipseStore has Entity and Details Test 2:
EclipseStore has Entity and Details Test 3:
EclipseStore has Entity and Details I Cannot figure out how to keep Lucene in sync with EclipseStore. |
Replies: 3 comments
|
Did you try to use gigamap.update() to update the indices before storing? // use the update method, to automatically propagate the changes to the index
gigaMap.update(person, p -> {
p.setLastName("Smith"),
p.setAddress(newAddress)
});
gigamap.store();please see https://docs.eclipsestore.io/manual/gigamap/crud.html |
|
Wanting to use Still open question: is
do call the I'd have expected that the Please correct me, if I read it wrongly and it is transactional and does update the same Interesting side note - the Tags (a Set) are stored "upside down" in EclipseStore for the Entities where Dummy one 2026-06-17T09:57:50.038738 | one, two, three |
|
Thanks for the detailed write-up @bachlge - you've actually surfaced several real problems, not just a usage misunderstanding. I dug into the code and you're right on most of it. Here's what's going on and what we're tracking. Why your three tests behave differently The root cause is that EclipseStore has no dirty tracking, and a GigaMap index (Lucene included) is only ever refreshed through the GigaMap mutation methods - add / update / apply / replace / remove. The DocumentPopulator runs inside those calls, not at store() time:
So:
gigaMap.update(entity, e -> …) fixes it because that's the one sanctioned path that re-runs the populator. The parts that are genuine problems (now tracked) You shouldn't have had to add a non-Lucene index just to get update() to work, and "save it when I tell you to save" is a reasonable expectation that today's behavior doesn't fully meet. We've filed these as #713–#716:
The one I'd set aside The Set element ordering you noticed is just HashSet iteration nondeterminism in the populator - field order within a Lucene document doesn't affect indexing or search results, so that one's cosmetic rather than a correctness issue. Thanks again for the thorough report - it directly led to four concrete issues. We'll follow up on those. |
Thanks for the detailed write-up @bachlge - you've actually surfaced several real problems, not just a usage misunderstanding. I dug into the code and you're right on most of it. Here's what's going on and what we're tracking.
Why your three tests behave differently
The root cause is that EclipseStore has no dirty tracking, and a GigaMap index (Lucene included) is only ever refreshed through the GigaMap mutation methods - add / update / apply / replace / remove. The DocumentPopulator runs inside those calls, not at store() time: