Delete document from enterprise search

Hello Dear,

I'm implementing elastic enterprise search with express.js. So my task is deleting documents from app search. Firstly i used destroyDocuments. But parameter of this function is only document id. So my question is, is it possible that delete by custom field?

Thanks in advance.

Hi @MaralErdene_Tumursuh,

There's no way to add a query to that function, so you'll need to query the documents to be deleted via one of the other functions (depending on your use case) and then pass the resulting document ids to the destroyDocuments function.

1 Like

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