I hope you’re fine. I’m pretty new to OpenSearch.
I have an index with a field containing dots. When searching using query_string
, I can get results only if I enter the whole word or value for the field.
What I’m trying to achieve is to be able to enter something like csdp
and get records with csdp.worker
as the value for my field, match, for example.
Below are my index mapping and the query I’m using:
{
"csdp" : {
"mappings" : {
"properties" : {
"datetime" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"emitter" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"log" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
}
}
}
{
"query": {
"query_string": {
"query": "emitter:async"
}
}
}
The request above will have no records matching, but replacing with async.ussd
(as indexed) gives results.
By searching, I found this could be related to the field type or analyzer used for the field (emitter
here) but I don’t really know what to do.
Any advice or documentation to help me could be very useful.
Thank you.