zipkin2.elasticsearch.internal.client.SearchRequest Maven / Gradle / Ivy
/*
* Copyright The OpenZipkin Authors
* SPDX-License-Identifier: Apache-2.0
*/
package zipkin2.elasticsearch.internal.client;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import zipkin2.internal.Nullable;
public final class SearchRequest {
public static SearchRequest create(List indices) {
return new SearchRequest(indices, null);
}
public static SearchRequest create(List indices, String type) {
return new SearchRequest(indices, type);
}
/**
* The maximum results returned in a query. This only affects non-aggregation requests.
*
* Not configurable as it implies adjustments to the index template (index.max_result_window)
*
*
See https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html
*/
static final int MAX_RESULT_WINDOW = 10000; // the default elasticsearch allowed limit
transient final List indices;
@Nullable transient final String type;
Integer size = MAX_RESULT_WINDOW;
Boolean _source;
Object query;
Map aggs;
SearchRequest(List indices, @Nullable String type) {
this.indices = indices;
this.type = type;
}
public static class Filters extends ArrayList