concept global in category elasticsearch
appears as: global

This is an excerpt from Manning's book Elasticsearch in Action.
They run on the results of your query. Documents that don’t match your query aren’t accounted for unless you include them with the global aggregation, which is a bucket aggregation that will be covered later in this chapter.
global creates a bucket with all the documents of the indices and types you’re searching on. This is useful when you want to run aggregations on all documents, no matter the query.
Using your get-together site from the code samples, assume you’re querying for events about Elasticsearch, but you want to see the most frequent tags overall. For example, as we described earlier, you want to show those top tags somewhere on a sidebar, independent of what the user is searching for. To achieve this, you need to use the global aggregation, which can alter the flow of data from query to aggregations, as shown in figure 7.12.
In the following listing you’ll nest the terms aggregation under the global aggregation to get the most frequent tags on all documents, even if the query looks for only those with “elasticsearch” in the title.