I'm trying to return an OpenSearch Dashboards link within a JSON API. That should result in dashboards query that returns all documents within an index that contains an exact match of a value. Let me demonstrate using the following example:
// Query value 'abc '
// Document A
{
"field_a": "abc"
}
// Document B
{
"field_b": "abcd"
}
// Document C
{
"field_a": "ab"
}
I want my query to return documents A and B, but not C.
Essentially I can do that in OpenSearch Dashboards by wrapping my query value with double quotes - "abc"
. That however is a problem, when the link is contained within a JSON file, since it is then escaped to \"abc\"
. which is no longer considered as an exact-match query by the Dashboard. Thus in the above example, all files will probably be returned and some will have a lower _score.
I've been to the dql docs, but I didn't find anything there. Is there an alternative way of querying to get the data I need?
Constructing the OpenSearch Dashboard url itself is not an issue.