Skip to content
Advertisement

ElasticSearch query is malformed. Elastic-PHP Client

I am facing an issue which is causing the query to malfunctioned. My query is as follows

JavaScript

It is returning the error as

JavaScript

I have also installed Kibana the query there works perfectly. I am trying to replicate it to PHP Client but it gives me error. The working query in Kibana is as follows

JavaScript

Advertisement

Answer

You seem to have missed a bracket after the Terms Query and there were other formatting issues too, but I believe the below query should help you:

JavaScript

Hope this helps!

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement