Deleting a documents using regular expressions

Hi

Lets say there are documents with id 1001,1002,1003,1004

Is there any method to delete the document by using the regular expressions?

DELETE indexname/100*

The only way is by using delete by query feature.

can u please just give me sample example once.

Thanks in advance.

Here is the documentation for Delete By Query: https://www.elastic.co/guide/en/elasticsearch/reference/6.5/docs-delete-by-query.html

Here is the documentation for Regex queries: https://www.elastic.co/guide/en/elasticsearch/reference/6.5/query-dsl-regexp-query.html

I'd recommend first trying with a search query to make sure your query is correct and then use the Delete By Query API with the same query.

Thanks a lot:)

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