ESQuery range bug - always error
complete
P
Peach puff Wolf
When I make a call and my ESQuery contains a range operator I always get an error in the response. The ESQuery is malformed.
I tried copy-pasting and even slightly adapting for python syntax ESQueries with a range operator built in the Query Builder and still get an error.
Attached are two screenshots with different syntaxes I tried from the Query Builder.
P
Previous Wildfowl
marked this post as
complete
The Query Builder is now correctly building Elasticsearch queries to match PDL-supported functionality.
V
Varun Villait
marked this post as
doing now
P
Previous Wildfowl
Peach puff Wolf
I have, however, confirmed that the Query Builder is not outputting the right syntax. This should be fixed shortly. Thank you for raising.
P
Previous Wildfowl
Hi Peach puff Wolf.
Thanks for submitting this.
PDL doesn't support
adjust_pure_negative
include_lower
include_upper
or time_zone
. Removing these parameters will allow you to successfully run the query against the Person Search API.For a list of supported query types in Elasticsearch, check out Elasticsearch Query Limitations.
See below for a successful query:
{
"query": {
"bool": {
"must": [
{
"bool": {
"must": [
{
"term": {
"gender": {
"value": "male"
}
}
},
{
"term": {
"job_title": {
"value": "co-founder"
}
}
}
],
}
},
{
"range": {
"job_last_updated": {
"from": "2019",
"to": None
}
}
}
]
}
}
}