Versions:
node: v10.14.1
@opensearch-project/opensearch: ^2.1.0
opensearch docker container: 2.4.0
Describe the issue:
Hi everyone,
I can’t understand how to escape dash when I send the query to opensearch.
I’m using this structure to search on every field in my index:
{
"index": "preg",
"body": {
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "*2022*"
}
},
{
"bool": {
"should": [
{
"match": {
"owner": 6
}
},
{
"match": {
"owner": 2
}
}
]
}
}
]
}
}
}
}
and everything works fine.
But when I add a dash to the date (2022-), no items are found.
I tried with “2022\-” but it still doesn’t work.
Can you tell me what is the correct way to escape special chars?
Thank you.