I am using ElasticSearch as part of AWS OpenSearch. I am using the AppSync query builder to apply a wildcard:
filter on a date field with the format 2023-07-28T16:19:23.196Z
. I am interested in returning matches which share the year, date, time 2023-07-28
portion of this date format.
When executing a query with the following filter, all entries in the year 2023 are returned (as expected).
query MyQuery {
search(filter: {date_needed_by: {wildcard: "2023*"}}) {
...
}
}
However, when I add the month and day into the filter like so, it fails to return any results, despite the matching entries being present.
query MyQuery {
search(filter: {date_needed_by: {wildcard: "2023-07-28*"}}) {
...
}
}
This issue persists even if the hyphens are replaced with *
or ?
operators. I am at a loss for the cause of this behavior and have found no help in the documentation. Many thanks in advance.