public class ElasticsearchQueryOptimizer extends Object
| Modifier and Type | Method and Description | 
|---|---|
static JsonObject | optimize(JsonObject query)Optimize the given Elasticsearch query.  | 
public static JsonObject optimize(JsonObject query)
Optimize the given Elasticsearch query. For example, remove unnecessary boolean clauses or merged nested ones.
Attention: This method is destructive. It changes the given object in place.
query - the query to optimizequery)