_delete_by_query must match exactly

Hi,

I am trying to delete an index by using the _delete_by_query command and passing in a term I would like removed. The issue I am having is that if there are matching indexes that have any part of the term are being removed however I would only like the exact match to be removed.

For example:
Index: How to
Index: How to do
Index: How to do something

_delete_by_query: How to do something

Desired result is to only have the index "How to do something" removed. Currently all 3 indexes are removed.

My CURL request is:

'{
"query": {
	"match": {
		"title": "' . $q . '"
	}
}
}'

Thanks

It depends on the analyzer you used.
But here may be try a match_phrase instead.

Thank you. This worked great. Had to use a different analyzer (as mentioned).

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