On Elastic 6.6, I'm trying to create an index that supports a regex search when the regex has spaces in it.
I see older references to not_analyzed
that no longer apply to modern versions of Elasticsearch.
I've tried, for example:
PUT /_template/other
{
"index_patterns": ["other", "other-*"],
"mappings": {
"other": {
"properties": {
"message": {
"index": true,
"type": "text",
"fields": {
"raw": {
"type": "text",
"analyzer": "keyword"
}
}
}
}
}
}
}
and variations:
"raw": {
"type": "keyword"
}
but can't figure out how to get it to work with a simple document like:
POST /other-testing/other
{
"message": "hello there I'm testing spaces"
}
and a search such as:
{
"regexp": {
"message": {
"value": ".*testing .*"
}
}
}