Hi Thomas, thanks for the idea, but let me try challenge it:
One could add the flag to the query when loading the entities to index, but that would require to put the "check indexable" logic to be put in two places - the query as well as the interceptor.
Loading all data from the database is very likely a performance bottleneck, in some cases it could take hours if not days. The only option you have is to reduce the amount of data by narrowing down the selection. While no developer likes duplication, to save a couple of lines of code would it really be desirable to face much longer indexing times?
For partial updates it would be necessary to apply the check manually and then decide whether to call index() or purge(), which would add another place for the check logic (this could be alleviated via a common class that is used by the rebuild as well as the interceptor, but would still add some complexity).
Sorry I'm not understanding what you mean with "partial updates". Could you elaborate on what you're trying to achieve?
|