Hi,
I have an index that store an "url" field that contains "/" (forward slash) on which I execute only query_string
searches.
Unfortunately the slash "/" seems to have side effects on query_string search because of the analyzer on the field. The same when you use the wildcard character "*".
I don't get any errors by the query_string search, just a wrong or empty result.
So my question is: What type of mapping I should use for a field to support the slash "/" as a normal character for a field used only on Query String searches?
Something similar was discussed on this post:
But no solutions.
Currently I have the configuration below for the index:
Field Mapping
{
"name": {
"type": "text"
},
"hash": {
"type": "keyword"
},
"duration": {
"type": "float"
}
}
Settings
{
"analysis": {
"char_filter": {
"replace": {
"type": "mapping",
"mappings": [
"&=> and "
]
}
},
"filter": {
"word_delimiter": {
"type": "word_delimiter",
"split_on_numerics": false,
"split_on_case_change": true,
"generate_word_parts": true,
"generate_number_parts": true,
"catenate_all": true,
"preserve_original": true,
"catenate_numbers": true
}
},
"analyzer": {
"default": {
"type": "custom",
"char_filter": [
"html_strip",
"replace"
],
"tokenizer": "whitespace",
"filter": [
"lowercase",
"word_delimiter"
]
}
}
}
}
What analyzer configuration should be used to make Query String works also with "/" and "*"?