Ability to exclude documents matching a certain criteria from index
We don't do physical deletion of documents, but a logical one, flagging them by setting a value for a deleted_at
field.
We would like an option to exclude documents where that field exists and is not null from the index, because they will never be returned and are only consuming space of the index.
Currently we use a mustNot
condition to exclude them, but of course they are still being indexed.
The ideal would be to be able to define the exclusion criteria in the index definition.
1
vote
Germán
shared this idea