Delete by query with an App Search Engine

Hi,

We are facing an issue where we have an engine in App Search and we wish to delete up to 10k documents (from a total of 50k+). This is too many documents to (efficiently) delete manually via the documents api.

Can we delete the documents directly from the Elasticsearch index using the delete by query api to find all the documents with a certain field value, and delete them?

By deleting documents directly from the index, and not through the API in App Search, would this cause any issue with App search itself? We use the search and documents APIs, we have some search relevance settings and no curations.

Thank you

Hi @Conor_Hennessy

Unless you are using an Elasticsearch Index based Engine (Tech Preview in 8.3.x, see here), we do not recommend using Elasticsearch APIs to manage your App Search Engines.

You should be able to delete 100 documents at a time using the Documents API. You can call that endpoint concurrently with multiple threads in order to more quickly remove your 10k documents.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.