Soft Delete Indexed Entites

Hello guys,

i was wondering how to handle the soft deletable entities with the indexation for ElasticSearch.
i would like the index to be remove from elastic cluster when the entity is updated and maybe if a predicated is verified.

do you have any ideas?

see ya

Hello,

This was formerly achieved in Hibernate Search 5 through indexing interceptors, which are yet to be restored in Search 6 (HSEARCH-3108).

In the meantime, the only solution I see is to index a “soft-deletion” marker, and to explicitly filter all your search queries to ignore the entities that are “soft-deleted”.

1 Like

Thanks @yrodiere, i will go for the “marker” option :slight_smile: