I have a field defined in ES as
"fieldName": { "type": "text", "fields": { "keyword": { "type": "keyword" } } },
Its a text field, which values can be numeric or alphanumeric. I want to delete all the documents which are alphanumeric but not numeric. How can I achieve it?
below Regexp did not work
{
"query": {
"bool": {
"filter": {
"regexp": {
"fieldName": {
"value": "/^(?![0-9]*$)[a-zA-Z0-9]+$/",
"boost": 1.2
}
}
}
}
}
}