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 @@ -76,7 +76,7 @@ public class CrossClusterEsqlRCS1MissingIndicesIT extends AbstractRemoteClusterS
record ExpectedCluster(String clusterAlias, String indexExpression, String status, Integer totalShards) {}

@SuppressWarnings("unchecked")
public void assertExpectedClustersForMissingIndicesTests(Map<String, Object> responseMap, List<ExpectedCluster> expected) {
void assertExpectedClustersForMissingIndicesTests(Map<String, Object> responseMap, List<ExpectedCluster> expected) {
Map<String, ?> clusters = (Map<String, ?>) responseMap.get("_clusters");
assertThat((int) responseMap.get("took"), greaterThan(0));

Expand Down Expand Up @@ -220,7 +220,7 @@ public void testSearchesAgainstNonMatchingIndicesWithSkipUnavailableTrue() throw
);
}

// since at least one index of the query matches on some cluster, a wildcarded index on skip_un=true is not an error
// since at least one index of the query matches on some cluster, a missing wildcarded index on skip_un=true is not an error
{
String q = Strings.format("FROM %s,%s:nomatch*", INDEX1, REMOTE_CLUSTER_ALIAS);

Expand Down Expand Up @@ -358,7 +358,7 @@ public void testSearchesAgainstNonMatchingIndicesWithSkipUnavailableFalse() thro

String limit0 = q + " | LIMIT 0";
e = expectThrows(ResponseException.class, () -> client().performRequest(esqlRequest(limit0)));
assertThat(e.getMessage(), Matchers.containsString("Unknown index [nomatch]"));
assertThat(e.getMessage(), containsString("Unknown index [nomatch]"));
}

// missing concrete remote index is not fatal when skip_unavailable=true (as long as an index matches on another cluster)
Expand All @@ -371,7 +371,7 @@ public void testSearchesAgainstNonMatchingIndicesWithSkipUnavailableFalse() thro

String limit0 = q + " | LIMIT 0";
e = expectThrows(ResponseException.class, () -> client().performRequest(esqlRequest(limit0)));
assertThat(e.getMessage(), Matchers.containsString(Strings.format("Unknown index [%s:nomatch]", REMOTE_CLUSTER_ALIAS)));
assertThat(e.getMessage(), containsString(Strings.format("Unknown index [%s:nomatch]", REMOTE_CLUSTER_ALIAS)));
}

// since there is at least one matching index in the query, the missing wildcarded local index is not an error
Expand Down
Loading