Comment by vosper
4 years ago
I think this might be partly due to the query language being JSON? It makes every example huge and hard to understand. JSON is a serialization format that's human-readable, it's not a human-first language. So it's a pity that's how you're expected to write searches (I know they have some SQL support now, but I've never seen it in the docs)
I don't think this has anything to do with json or examples in general. At least not for me.
Quite often after reading their doc I just don't understand what result I should expect. Also the whole documentation simply lacks sane navigation. It's almost impossible to find anything there without google.
In 50% of cases this is how it works for me (exaggerated):
Question: how do I sum two integers?
Expected Answer: You should use SUM(). The result of the function is the sum of two integers. Examples:
2 + 2 = 4
2 + (-2) = 0
-1 + (-1) = -2
Answer from Elastic docs: Well, you should execute this query agains this API, which will launch X subroutines in Elastic engine and the final result will be the result of of the aggregation of function defined by the Ex with En+1 being your query's body field Y with respect to url query param N.