According to
HSEARCH-1225
the EntityIndexInterceptor is not used when calling index(). However, using index() for (partial) index rebuilds might require using the interceptor, e.g. for checking a soft delete flag.
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. 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).
It would be helpful, if we could specify whether to use the interceptor when during index() or not (default might be to ignore the interceptor).
This would allow the check logic to be placed in the interceptor only.
|