I'm trying to set a field not to be analyzed so I can search for "/" slashes (as in URL requests). After searching the past questions and on google, the answer seems to be to make the index "not_analyzed". However, when I tried this on my environment, I get a status 400 error:
{
"error": {
"root_cause": [
{
"type": "resource_already_exists_exception",
"reason": "index [apachelogs-support-2019.01.31/84jgHStuRoO9N0I9end2Jg] already exists",
"index_uuid": "84jgHStuRoO9N0I9end2Jg",
"index": "apachelogs-support-2019.01.31"
}
],
"type": "resource_already_exists_exception",
"reason": "index [apachelogs-support-2019.01.31/84jgHStuRoO9N0I9end2Jg] already exists",
"index_uuid": "84jgHStuRoO9N0I9end2Jg",
"index": "apachelogs-support-2019.01.31"
},
"status": 400
}
This is how I attempted to change the index field:
PUT apachelogs-support-2019.01.31
{
"mappings": {
"doc": {
"properties": {
"request": {
"type": "text",
"index": "not_analyzed"
}
}
}
}
}
I suspect I got the syntax wrong, can anyone verify?
Thanks
Rudy