Closed Banashek closed 10 months ago
Thank you for reporting this issue.
Both shorthand and verbose forms of term queries should work identically in Elasticsearch. The format of "term": {"my_field": "1"}
and "term": {"my_field": {"value": "1"}}
should give the same result. However, I noticed that you've used 1
(an integer) in your shorthand form and "1"
(a string) in your verbose form. This could explain why you're seeing different behaviors.
The plugin sends the request JSON body as it is, without any modifications. If you believe the plugin is modifying the JSON request, please provide more details so I can further investigate.
Describe the bug Shorthand term queries appear to not be sending correctly
Steps to reproduce I have a fairly simple term query I'm attempting through the query console, but it seems to not have an optimization that I see in the kibana query console.
Example query:
Note that the above
term
does not explicitly have the name of the field as an object underneath it, but as a simple property.Compare:
vs the ElasticSearch documented:
When the query is sent, this term appears to not be sent at all (I receive all results back).
Expected behavior That the result behavior would be similar to kibana, or that I would be notified that the clause in question would be ignored.
Environment information:
13.3.1
2023.2
(build#DB-232.8660.111
)2023.2.5-232
Elasticsearch 7.1