I have a document as:
{
"_type": "users",
"_id": "U_6900/17",
"_source": {
"name": "User name"
}
}
I tried to delete this record using:
DELETE user_entity/users/_query
{
"query": {
"term": {
"id": "U_6900/17"
}
}
}
This does not delete the entry as the forward slash in "id" field separates the query.
How can I delete this record from Elasticsearch? Any help is appreciated.
You can do it in two ways. Either by referencing the document directly like this:
DELETE user_entity/users/U_6900%2F17
Or via an ids
query like this:
DELETE user_entity/users/_query
{
"query": {
"ids": {
"values": ["U_6900/17"]
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With