Open stevejgordon opened 2 years ago
Pinging @elastic/es-search (Team:Search)
I have confirmed this still exists and honestly, I don't know if we can or will fix it. The tricky part is that I don't think we want to apply the timezone if the query string is querying any field other than a particular dateField. If we do, that will change the behavior pretty significantly.
I suggest we close this as "wont fix" @javanna @cbuescher . Though we should better document how timezone
plays with query string.
Pinging @elastic/es-docs (Team:Docs)
Pinging @elastic/es-search-relevance (Team:Search Relevance)
It was recently noted that when specifying a
time_zone
for a query string query, it is not always applied to the value being searched. This issue is intended to review this behaviour and discuss if it is as historically designed. This applies to7.x
and8.x
versions.The supplied example is:
After investigating further, I noted that the query string query works as expected (applying the time zone to the query value) if the field is specified using either of these approaches. This doesn't seem to be explicitly called out in the documentation.
@cbuescher also took a look at the QueryStringQueryParser code governing this behaviour and confirmed that when the date field is specifically targetted or the default field, the timezone should get applied.