The documentation is generally written in the syntax accepted by Kibana Console (formally known as Sense). Kibana Console accepts scripts surrounded by triple double-quotes so you can write scripts that span multiple lines so they are easier to read. Console flattens these scripts to a single line and replaces the triple double-quotes with single double-quotes when it sends the request to Elasticsearch. If you are sending requests from outside of Console then you are right that you need to use single double-quotes and the script needs to be on one line.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.