| Thanks for example Yoann Rodière, I hadn't thought of functions being computed from other fields. So the choice is to either:
- SUBTRACTIVE: assume all fields might affect the built document, and have people exclude specific fields by marking them as "safe to ignore"
- ADDITIVE: assume all indexed fields are not affecting the document, and allow people to explicitly list which ones need actually be considered
Intuitively I'd like the second choice better as it means the engine can evolve into a clear function defining "input fields" -> "output fields". Unfortunately it's also a choice which will cause issues to users not aware of this working details. (To be fair this is a problem for them already and it didn't seem to come up as a FAQ but it's something I'd rather improve on). What would you think of going for the second choice - to detect affecting fields automatically and allow people to add something similar to AssociateDirty - but disable the whole dirty-checking optimisation by default on each entity? We could make it an attribute at class level @Indexed(enableDirtyCheckingOptimisations=true). Looking forward for your opinions! |