Hi, is there a way to convert a user input string to Query DSL in Node? I notice that searchBar in ElasticUI framework can convert a string to Query DSL object. I'm wondering whether there is a way to convert an input string to DSL object on server side. Thanks in advance!
Example:
User input: a reason:b
Converted Query DSL:
{
"bool": {
"must": [
{
"simple_query_string": {
"query": "a"
}
},
{
"match": {
"reason": {
"query": "b",
"operator": "and"
}
}
}
]
}
}