Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ public class InnerHits implements JsonpSerializable {
@Nullable
private final Boolean seqNoPrimaryTerm;

private final List<String> fields;
private final List<String> field;

private final List<FieldAndFormat> fields;

private final List<SortOptions> sort;

Expand Down Expand Up @@ -124,6 +126,7 @@ private InnerHits(Builder builder) {
this.ignoreUnmapped = builder.ignoreUnmapped;
this.scriptFields = ApiTypeHelper.unmodifiable(builder.scriptFields);
this.seqNoPrimaryTerm = builder.seqNoPrimaryTerm;
this.field = ApiTypeHelper.unmodifiable(builder.field);
this.fields = ApiTypeHelper.unmodifiable(builder.fields);
this.sort = ApiTypeHelper.unmodifiable(builder.sort);
this.source = builder.source;
Expand Down Expand Up @@ -222,10 +225,17 @@ public final Boolean seqNoPrimaryTerm() {
return this.seqNoPrimaryTerm;
}

/**
* API name: {@code field}
*/
public final List<String> field() {
return this.field;
}

/**
* API name: {@code fields}
*/
public final List<String> fields() {
public final List<FieldAndFormat> fields() {
return this.fields;
}

Expand Down Expand Up @@ -341,12 +351,22 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("seq_no_primary_term");
generator.write(this.seqNoPrimaryTerm);

}
if (ApiTypeHelper.isDefined(this.field)) {
generator.writeKey("field");
generator.writeStartArray();
for (String item0 : this.field) {
generator.write(item0);

}
generator.writeEnd();

}
if (ApiTypeHelper.isDefined(this.fields)) {
generator.writeKey("fields");
generator.writeStartArray();
for (String item0 : this.fields) {
generator.write(item0);
for (FieldAndFormat item0 : this.fields) {
item0.serialize(generator, mapper);

}
generator.writeEnd();
Expand Down Expand Up @@ -433,7 +453,10 @@ public static class Builder extends WithJsonObjectBuilderBase<Builder> implement
private Boolean seqNoPrimaryTerm;

@Nullable
private List<String> fields;
private List<String> field;

@Nullable
private List<FieldAndFormat> fields;

@Nullable
private List<SortOptions> sort;
Expand Down Expand Up @@ -463,6 +486,7 @@ private Builder(InnerHits instance) {
this.ignoreUnmapped = instance.ignoreUnmapped;
this.scriptFields = instance.scriptFields;
this.seqNoPrimaryTerm = instance.seqNoPrimaryTerm;
this.field = instance.field;
this.fields = instance.fields;
this.sort = instance.sort;
this.source = instance.source;
Expand Down Expand Up @@ -614,12 +638,32 @@ public final Builder seqNoPrimaryTerm(@Nullable Boolean value) {
return this;
}

/**
* API name: {@code field}
* <p>
* Adds all elements of <code>list</code> to <code>field</code>.
*/
public final Builder field(List<String> list) {
this.field = _listAddAll(this.field, list);
return this;
}

/**
* API name: {@code field}
* <p>
* Adds one or more values to <code>field</code>.
*/
public final Builder field(String value, String... values) {
this.field = _listAdd(this.field, value, values);
return this;
}

/**
* API name: {@code fields}
* <p>
* Adds all elements of <code>list</code> to <code>fields</code>.
*/
public final Builder fields(List<String> list) {
public final Builder fields(List<FieldAndFormat> list) {
this.fields = _listAddAll(this.fields, list);
return this;
}
Expand All @@ -629,11 +673,20 @@ public final Builder fields(List<String> list) {
* <p>
* Adds one or more values to <code>fields</code>.
*/
public final Builder fields(String value, String... values) {
public final Builder fields(FieldAndFormat value, FieldAndFormat... values) {
this.fields = _listAdd(this.fields, value, values);
return this;
}

/**
* API name: {@code fields}
* <p>
* Adds a value to <code>fields</code> using a builder lambda.
*/
public final Builder fields(Function<FieldAndFormat.Builder, ObjectBuilder<FieldAndFormat>> fn) {
return fields(fn.apply(new FieldAndFormat.Builder()).build());
}

/**
* How the inner hits should be sorted per <code>inner_hits</code>. By default,
* inner hits are sorted by score.
Expand Down Expand Up @@ -769,7 +822,8 @@ protected static void setupInnerHitsDeserializer(ObjectDeserializer<InnerHits.Bu
op.add(Builder::scriptFields, JsonpDeserializer.stringMapDeserializer(ScriptField._DESERIALIZER),
"script_fields");
op.add(Builder::seqNoPrimaryTerm, JsonpDeserializer.booleanDeserializer(), "seq_no_primary_term");
op.add(Builder::fields, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "fields");
op.add(Builder::field, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()), "field");
op.add(Builder::fields, JsonpDeserializer.arrayDeserializer(FieldAndFormat._DESERIALIZER), "fields");
op.add(Builder::sort, JsonpDeserializer.arrayDeserializer(SortOptions._DESERIALIZER), "sort");
op.add(Builder::source, SourceConfig._DESERIALIZER, "_source");
op.add(Builder::storedFields, JsonpDeserializer.arrayDeserializer(JsonpDeserializer.stringDeserializer()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
'_global.search._types.HighlighterType': '_global/search/_types/highlighting.ts#L177-L192',
'_global.search._types.Hit': '_global/search/_types/hits.ts#L40-L69',
'_global.search._types.HitsMetadata': '_global/search/_types/hits.ts#L71-L81',
'_global.search._types.InnerHits': '_global/search/_types/hits.ts#L115-L149',
'_global.search._types.InnerHits': '_global/search/_types/hits.ts#L115-L152',
'_global.search._types.InnerHitsResult': '_global/search/_types/hits.ts#L93-L95',
'_global.search._types.KnnCollectorResult': '_global/search/_types/profile.ts#L222-L228',
'_global.search._types.KnnQueryProfileBreakdown': '_global/search/_types/profile.ts#L199-L220',
Expand Down Expand Up @@ -229,7 +229,7 @@
'_global.search._types.TermSuggester': '_global/search/_types/suggester.ts#L497-L554',
'_global.search._types.TotalHits': '_global/search/_types/hits.ts#L103-L106',
'_global.search._types.TotalHitsRelation': '_global/search/_types/hits.ts#L108-L113',
'_global.search._types.TrackHits': '_global/search/_types/hits.ts#L151-L159',
'_global.search._types.TrackHits': '_global/search/_types/hits.ts#L154-L162',
'_global.search_mvt.Request': '_global/search_mvt/SearchMvtRequest.ts#L39-L356',
'_global.search_mvt.Response': '_global/search_mvt/SearchMvtResponse.ts#L22-L25',
'_global.search_mvt._types.GridAggregationType': '_global/search_mvt/_types/GridType.ts#L30-L33',
Expand Down Expand Up @@ -1555,9 +1555,9 @@
'indices._types.DataStreamFailureStore': 'indices/_types/DataStreamFailureStore.ts#L22-L37',
'indices._types.DataStreamFailureStoreTemplate': 'indices/_types/DataStreamFailureStore.ts#L39-L54',
'indices._types.DataStreamIndex': 'indices/_types/DataStream.ts#L160-L185',
'indices._types.DataStreamLifecycle': 'indices/_types/DataStreamLifecycle.ts#L26-L51',
'indices._types.DataStreamLifecycleRolloverConditions': 'indices/_types/DataStreamLifecycle.ts#L66-L78',
'indices._types.DataStreamLifecycleWithRollover': 'indices/_types/DataStreamLifecycle.ts#L53-L64',
'indices._types.DataStreamLifecycle': 'indices/_types/DataStreamLifecycle.ts#L26-L61',
'indices._types.DataStreamLifecycleRolloverConditions': 'indices/_types/DataStreamLifecycle.ts#L83-L95',
'indices._types.DataStreamLifecycleWithRollover': 'indices/_types/DataStreamLifecycle.ts#L70-L81',
'indices._types.DataStreamOptions': 'indices/_types/DataStreamOptions.ts#L25-L34',
'indices._types.DataStreamOptionsTemplate': 'indices/_types/DataStreamOptions.ts#L36-L41',
'indices._types.DataStreamTimestampField': 'indices/_types/DataStream.ts#L153-L158',
Expand Down Expand Up @@ -1610,6 +1610,7 @@
'indices._types.NumericFielddataFormat': 'indices/_types/NumericFielddataFormat.ts#L20-L23',
'indices._types.Queries': 'indices/_types/IndexSettings.ts#L437-L439',
'indices._types.RetentionLease': 'indices/_types/IndexSettings.ts#L66-L68',
'indices._types.RetentionSource': 'indices/_types/DataStreamLifecycle.ts#L63-L68',
'indices._types.SamplingConfiguration': 'indices/_types/SampleConfiguration.ts#L24-L64',
'indices._types.SamplingMethod': 'indices/_types/Downsample.ts#L33-L36',
'indices._types.SearchIdle': 'indices/_types/IndexSettings.ts#L261-L264',
Expand Down Expand Up @@ -1721,9 +1722,10 @@
'indices.get_all_sample_configuration.Request': 'indices/get_all_sample_configuration/IndicesGetAllSampleConfigurationRequest.ts#L24-L50',
'indices.get_all_sample_configuration.Response': 'indices/get_all_sample_configuration/IndicesGetAllSampleConfigurationResponse.ts#L22-L26',
'indices.get_all_sample_configuration._types.IndexSamplingConfiguration': 'indices/get_all_sample_configuration/_types/IndexSamplingConfiguration.ts#L23-L26',
'indices.get_data_lifecycle.DataStreamWithLifecycle': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30',
'indices.get_data_lifecycle.DataStreamWithLifecycle': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L31-L34',
'indices.get_data_lifecycle.Request': 'indices/get_data_lifecycle/IndicesGetDataLifecycleRequest.ts#L24-L69',
'indices.get_data_lifecycle.Response': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25',
'indices.get_data_lifecycle.Response': 'indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L24-L29',
'indices.get_data_lifecycle._types.GlobalRetention': 'indices/get_data_lifecycle/_types/response.ts#L22-L25',
'indices.get_data_lifecycle_stats.DataStreamStats': 'indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L46-L59',
'indices.get_data_lifecycle_stats.Request': 'indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsRequest.ts#L23-L42',
'indices.get_data_lifecycle_stats.Response': 'indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L24-L44',
Expand Down Expand Up @@ -1859,7 +1861,7 @@
'indices.simulate_template.Request': 'indices/simulate_template/IndicesSimulateTemplateRequest.ts#L33-L145',
'indices.simulate_template.Response': 'indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31',
'indices.simulate_template.Template': 'indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37',
'indices.split.Request': 'indices/split/IndicesSplitRequest.ts#L27-L116',
'indices.split.Request': 'indices/split/IndicesSplitRequest.ts#L27-L117',
'indices.split.Response': 'indices/split/IndicesSplitResponse.ts#L22-L28',
'indices.stats.IndexMetadataState': 'indices/stats/types.ts#L225-L228',
'indices.stats.IndexStats': 'indices/stats/types.ts#L52-L93',
Expand Down Expand Up @@ -3088,7 +3090,7 @@
'shutdown.get_node.ShardMigrationStatus': 'shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54',
'shutdown.get_node.ShutdownStatus': 'shutdown/get_node/ShutdownGetNodeResponse.ts#L45-L50',
'shutdown.get_node.ShutdownType': 'shutdown/get_node/ShutdownGetNodeResponse.ts#L40-L43',
'shutdown.put_node.Request': 'shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L110',
'shutdown.put_node.Request': 'shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L112',
'shutdown.put_node.Response': 'shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L25',
'simulate.ingest.IngestDocumentSimulation': 'simulate/ingest/SimulateIngestResponse.ts#L36-L80',
'simulate.ingest.MergeType': 'simulate/ingest/SimulateIngestRequest.ts#L113-L116',
Expand Down Expand Up @@ -3507,10 +3509,10 @@
if (hash.length > 1) {
hash = hash.substring(1);
}
window.location = "https://github.com/elastic/elasticsearch-specification/tree/928c63cb55207b6063e98c17f7f98de72ddda161/specification/" + (paths[hash] || "");
window.location = "https://github.com/elastic/elasticsearch-specification/tree/5ee1f7c137b141a3057b1800333cd6d4b1fc9dce/specification/" + (paths[hash] || "");
</script>
</head>
<body>
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/928c63cb55207b6063e98c17f7f98de72ddda161/specification/">Elasticsearch API specification</a>.
Please see the <a href="https://github.com/elastic/elasticsearch-specification/tree/5ee1f7c137b141a3057b1800333cd6d4b1fc9dce/specification/">Elasticsearch API specification</a>.
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ public class DataStreamLifecycle implements JsonpSerializable {
@Nullable
private final Time dataRetention;

@Nullable
private final Time effectiveRetention;

@Nullable
private final RetentionSource retentionDeterminedBy;

private final List<DownsamplingRound> downsampling;

@Nullable
Expand All @@ -80,6 +86,8 @@ public class DataStreamLifecycle implements JsonpSerializable {
protected DataStreamLifecycle(AbstractBuilder<?> builder) {

this.dataRetention = builder.dataRetention;
this.effectiveRetention = builder.effectiveRetention;
this.retentionDeterminedBy = builder.retentionDeterminedBy;
this.downsampling = ApiTypeHelper.unmodifiable(builder.downsampling);
this.downsamplingMethod = builder.downsamplingMethod;
this.enabled = builder.enabled;
Expand All @@ -103,6 +111,26 @@ public final Time dataRetention() {
return this.dataRetention;
}

/**
* The least amount of time data should be kept by elasticsearch.
* <p>
* API name: {@code effective_retention}
*/
@Nullable
public final Time effectiveRetention() {
return this.effectiveRetention;
}

/**
* Configuration source that can influence the retention of a data stream.
* <p>
* API name: {@code retention_determined_by}
*/
@Nullable
public final RetentionSource retentionDeterminedBy() {
return this.retentionDeterminedBy;
}

/**
* The list of downsampling rounds to execute as part of this downsampling
* configuration
Expand Down Expand Up @@ -154,6 +182,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
this.dataRetention.serialize(generator, mapper);

}
if (this.effectiveRetention != null) {
generator.writeKey("effective_retention");
this.effectiveRetention.serialize(generator, mapper);

}
if (this.retentionDeterminedBy != null) {
generator.writeKey("retention_determined_by");
this.retentionDeterminedBy.serialize(generator, mapper);
}
if (ApiTypeHelper.isDefined(this.downsampling)) {
generator.writeKey("downsampling");
generator.writeStartArray();
Expand Down Expand Up @@ -214,6 +251,12 @@ public abstract static class AbstractBuilder<BuilderT extends AbstractBuilder<Bu
@Nullable
private Time dataRetention;

@Nullable
private Time effectiveRetention;

@Nullable
private RetentionSource retentionDeterminedBy;

@Nullable
private List<DownsamplingRound> downsampling;

Expand Down Expand Up @@ -248,6 +291,35 @@ public final BuilderT dataRetention(Function<Time.Builder, ObjectBuilder<Time>>
return this.dataRetention(fn.apply(new Time.Builder()).build());
}

/**
* The least amount of time data should be kept by elasticsearch.
* <p>
* API name: {@code effective_retention}
*/
public final BuilderT effectiveRetention(@Nullable Time value) {
this.effectiveRetention = value;
return self();
}

/**
* The least amount of time data should be kept by elasticsearch.
* <p>
* API name: {@code effective_retention}
*/
public final BuilderT effectiveRetention(Function<Time.Builder, ObjectBuilder<Time>> fn) {
return this.effectiveRetention(fn.apply(new Time.Builder()).build());
}

/**
* Configuration source that can influence the retention of a data stream.
* <p>
* API name: {@code retention_determined_by}
*/
public final BuilderT retentionDeterminedBy(@Nullable RetentionSource value) {
this.retentionDeterminedBy = value;
return self();
}

/**
* The list of downsampling rounds to execute as part of this downsampling
* configuration
Expand Down Expand Up @@ -327,6 +399,8 @@ protected static <BuilderT extends AbstractBuilder<BuilderT>> void setupDataStre
ObjectDeserializer<BuilderT> op) {

op.add(AbstractBuilder::dataRetention, Time._DESERIALIZER, "data_retention");
op.add(AbstractBuilder::effectiveRetention, Time._DESERIALIZER, "effective_retention");
op.add(AbstractBuilder::retentionDeterminedBy, RetentionSource._DESERIALIZER, "retention_determined_by");
op.add(AbstractBuilder::downsampling, JsonpDeserializer.arrayDeserializer(DownsamplingRound._DESERIALIZER),
"downsampling");
op.add(AbstractBuilder::downsamplingMethod, SamplingMethod._DESERIALIZER, "downsampling_method");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5051,6 +5051,8 @@ public CompletableFuture<SimulateTemplateResponse> simulateTemplate() {
* index.</li>
* <li>The number of primary shards in the target index must be a multiple of
* the number of primary shards in the source index.</li>
* <li>The number of primary shards in the target index must be a divisor of the
* source index's <code>index.number_of_routing_shards</code>.</li>
* <li>The node handling the split process must have sufficient free disk space
* to accommodate a second copy of the existing index.</li>
* </ul>
Expand Down Expand Up @@ -5130,6 +5132,8 @@ public CompletableFuture<SplitResponse> split(SplitRequest request) {
* index.</li>
* <li>The number of primary shards in the target index must be a multiple of
* the number of primary shards in the source index.</li>
* <li>The number of primary shards in the target index must be a divisor of the
* source index's <code>index.number_of_routing_shards</code>.</li>
* <li>The node handling the split process must have sufficient free disk space
* to accommodate a second copy of the existing index.</li>
* </ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5123,6 +5123,8 @@ public SimulateTemplateResponse simulateTemplate() throws IOException, Elasticse
* index.</li>
* <li>The number of primary shards in the target index must be a multiple of
* the number of primary shards in the source index.</li>
* <li>The number of primary shards in the target index must be a divisor of the
* source index's <code>index.number_of_routing_shards</code>.</li>
* <li>The node handling the split process must have sufficient free disk space
* to accommodate a second copy of the existing index.</li>
* </ul>
Expand Down Expand Up @@ -5202,6 +5204,8 @@ public SplitResponse split(SplitRequest request) throws IOException, Elasticsear
* index.</li>
* <li>The number of primary shards in the target index must be a multiple of
* the number of primary shards in the source index.</li>
* <li>The number of primary shards in the target index must be a divisor of the
* source index's <code>index.number_of_routing_shards</code>.</li>
* <li>The node handling the split process must have sufficient free disk space
* to accommodate a second copy of the existing index.</li>
* </ul>
Expand Down
Loading
Loading