Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indices options group wildcards #7

Closed
wants to merge 66 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
e35d783
Mark the enum options IGNORE_ALIASES and ALLOW_NO_INDICES as deprecat…
gmarouli Jan 23, 2024
9bb5ade
Group all wildcard options in one class.
gmarouli Jan 23, 2024
00c6c5b
Fix class method failure
gmarouli Jan 24, 2024
764e8f3
Fix XContent serialization
gmarouli Jan 24, 2024
93527cb
Support conflicting XContent serialization expectations
gmarouli Jan 24, 2024
bea09bf
Support conflicting XContent serialization expectations
gmarouli Jan 24, 2024
65a7035
Merge branch 'main' into indices-options-group-wildcards
gmarouli Jan 24, 2024
d5c0dcf
[Connectors API] Implement update service type action (#104643)
jedrazb Jan 24, 2024
4323ac3
Remove explicit ALLOW_NO_INDICES, it is on by default
gmarouli Jan 24, 2024
ef630a6
adding known issue for int8_hnsw (#104664)
benwtrent Jan 24, 2024
9d3207c
Speedup check for dynamic mappers when parsing documents (#104698)
original-brownbear Jan 24, 2024
7ef80f2
Fix precision issue in CI for cartesian centroids (#104707)
craigtaverner Jan 24, 2024
1c29d6e
Use faster way of making a set from a CHM (#104704)
original-brownbear Jan 24, 2024
d9088fa
Update IndicesOptionsTests and fix the related found bugs
gmarouli Jan 24, 2024
6c86aed
Rename expandWildcards field
gmarouli Jan 24, 2024
324d35f
Also allow test_grok_pattern's content passed by query param (#104714)
jan-elastic Jan 24, 2024
37c4393
Improve comments
gmarouli Jan 24, 2024
30f9639
Improve S3 storage class docs (#104599)
DaveCTurner Jan 24, 2024
8363437
TestGrokPatternAction is local-only (#104710)
DaveCTurner Jan 24, 2024
ab8ee60
Fix SamlAuthenticationIT flakyness (#103867)
breskeby Jan 24, 2024
6b910db
Fix serverless docker setup compatibility (#104724)
breskeby Jan 24, 2024
0f17ff4
[ML] Avoid possible datafeed infinite loop with filtering aggregation…
droberts195 Jan 24, 2024
eb8c73f
[ML] Adding support for Cohere inference service (#104559)
jonathan-buttner Jan 24, 2024
9b4647c
AwaitsFix #104728
mark-vieira Jan 24, 2024
90acd5d
merge with main
gmarouli Jan 25, 2024
d1e5f72
ESQL: Fix replacement of nested expressions in aggs with multiple par…
luigidellaquila Jan 25, 2024
e0ddb82
[CI] Ensure large response can fit into 3 messages (#104729)
ywangd Jan 25, 2024
a7f2e2d
Fix testRestoreSnapshotAllocationDoesNotExceedWatermarkWithMultipleSh…
idegtiarenko Jan 25, 2024
1116889
Remove unused arg from `ActionType` ctor (#104650)
DaveCTurner Jan 25, 2024
55ba6fe
Reinstate compat shim lost in #104650
DaveCTurner Jan 25, 2024
bec2115
Remove `ThreadPool` arg from `TransportResponseHandler#executor` (#10…
DaveCTurner Jan 25, 2024
82c4cc7
Fix dependency check for ignored licenses (#104736)
breskeby Jan 25, 2024
875840d
Rename resolveAlias to resolveAliases
gmarouli Jan 25, 2024
906cd66
Fix NPE
gmarouli Jan 25, 2024
de5821b
Fix test
gmarouli Jan 25, 2024
d6d449b
Fix XContent parsing
gmarouli Jan 25, 2024
54adb8d
Small fixes
gmarouli Jan 25, 2024
b4345d9
[Enterprise Search] Add `.connector-secrets` system index and GET/POS…
navarone-feekery Jan 25, 2024
4e91d69
Export random sampler agg from server (#104747)
droberts195 Jan 25, 2024
cb68e44
Extract GeneralOptions
gmarouli Jan 25, 2024
e48b549
[DOCS] Fixes asciidoc syntax in PUT trained models API docs. (#104741)
szabosteve Jan 25, 2024
209b655
Avoid eager task realization (#103343)
breskeby Jan 25, 2024
05ea8c7
Revert "[Enterprise Search] Add `.connector-secrets` system index and…
navarone-feekery Jan 25, 2024
599a96b
Fix writable
gmarouli Jan 25, 2024
35aff34
[ML] Add an important note about a gotcha with the delayed data check…
droberts195 Jan 25, 2024
05c7377
Closing services (#104726)
jonathan-buttner Jan 25, 2024
ba579f0
Preserve old serialisation for performance reasons
gmarouli Jan 25, 2024
e87c49c
[DOCS] Improve ES|QL functions reference for functions E-Z (#104623)
abdonpijpelink Jan 25, 2024
3fb2893
Avoid execute ESQL planning on refresh thread (#104591)
dnhatn Jan 25, 2024
048fa93
[Profiling] Refine co2 calculation data (#104628)
rockdaboot Jan 25, 2024
fc2bdc2
Build sub aggregation buckets more lazily (#104762)
original-brownbear Jan 25, 2024
a22e332
Extract concrete index options
gmarouli Jan 25, 2024
03c9f89
Make RestResponse releasable (#104752)
DaveCTurner Jan 25, 2024
e0514f3
[ES|QL] Allow DateTime as the third and fourth inputs to auto_bucket …
fang-xing-esql Jan 25, 2024
2a5cd78
Mute data_stream test (#104775)
mayya-sharipova Jan 25, 2024
79b7dbb
ESQL: add =~ operator (case insensitive equality) (#103656)
luigidellaquila Jan 26, 2024
6051c0d
Merge branch 'main' into indices-options-group-wildcards
gmarouli Jan 26, 2024
d876ec7
Add skip tags to three tests to prevent them from being run on versio…
fang-xing-esql Jan 26, 2024
807147d
Revert "x-pack/plugin/core: make automatic rollovers lazy" (#104734)
axw Jan 26, 2024
e495f7f
Use the randomly generated options
gmarouli Jan 26, 2024
d128481
Redefine index version 8500009 for use by 8.12.1 (#104755)
thecoop Jan 26, 2024
d5fd6ee
Merge branch 'main' into indices-options-group-wildcards
gmarouli Jan 26, 2024
99a6f89
Replace constructor usage with builders
gmarouli Jan 26, 2024
922781c
Reduce number of constants
gmarouli Jan 26, 2024
3d7b292
Use builder
gmarouli Jan 26, 2024
c8e4c91
Remove Writable from grouped IndicesOptions
gmarouli Jan 26, 2024
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
Prev Previous commit
Next Next commit
Support conflicting XContent serialization expectations
gmarouli committed Jan 24, 2024
commit 93527cb3f1eb1ce6f0e99da87bc074d2d4747c74
Original file line number Diff line number Diff line change
@@ -364,7 +364,7 @@ public static void writeSearchRequestParams(SearchRequest request, XContentBuild
xContentBuilder.field("index", request.indices());
}
if (request.indicesOptions().equals(SearchRequest.DEFAULT_INDICES_OPTIONS) == false) {
IndicesOptions.WildcardOptions.toXContent(request.indicesOptions().expandWildcards(), xContentBuilder);
IndicesOptions.WildcardOptions.toXContent(request.indicesOptions().expandWildcards(), xContentBuilder, true);
xContentBuilder.field("ignore_unavailable", request.indicesOptions().ignoreUnavailable());
}
if (request.searchType() != null) {
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
package org.elasticsearch.action.support;

import joptsimple.internal.Strings;

import org.elasticsearch.ElasticsearchParseException;
import org.elasticsearch.TransportVersions;
import org.elasticsearch.common.io.stream.StreamInput;
@@ -27,10 +28,8 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeBooleanValue;
import static org.elasticsearch.common.xcontent.support.XContentMapValues.nodeStringArrayValue;
@@ -87,11 +86,16 @@ public static WildcardOptions parseParameters(Object expandWildcards, Object all
return builder.build();
}

public static XContentBuilder toXContent(WildcardOptions options, XContentBuilder builder) throws IOException {
return toXContent(options, builder, false);
}

/**
* This converter to XContent only includes the fields a user can interact, internal options like the resolveAlias
* are not added.
*/
public static XContentBuilder toXContent(WildcardOptions options, XContentBuilder builder) throws IOException {
public static XContentBuilder toXContent(WildcardOptions options, XContentBuilder builder, boolean wildcardStatesAsString)
throws IOException {
List<String> legacyStates = new ArrayList<>(3);
if (options.includeOpen()) {
legacyStates.add("open");
@@ -107,9 +111,13 @@ public static XContentBuilder toXContent(WildcardOptions options, XContentBuilde
} else if (legacyStates.size() == 3) {
builder.field("expand_wildcards", "all");
} else {
// In order to be backwards compatible the value "expand_wildcards" needs to be a comma separated string
// and not an array of strings.
builder.field("expand_wildcards", Strings.join(legacyStates, ","));
if (wildcardStatesAsString) {
// In order to be backwards compatible the value "expand_wildcards" needs to be a comma separated string
// and not an array of strings.
builder.field("expand_wildcards", Strings.join(legacyStates, ","));
} else {
builder.field("expand_wildcards", legacyStates);
}
}
builder.field("allow_no_indices", options.allowEmptyExpressions());
return builder;