Skip to content
Merged
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 @@ -87,12 +87,20 @@ protected ExistsQueryBuilder doCreateTestQueryBuilder() {
} else {
fieldPattern = randomAlphaOfLengthBetween(1, 10);
}

// Avoid patterns that would match the derived field "raw.derived_keyword"
// which doesn't support exists queries
if (fieldPattern.startsWith("raw")) {
fieldPattern = TEXT_FIELD_NAME;
}

// also sometimes test wildcard patterns
if (randomBoolean()) {
if (randomBoolean()) {
if (randomBoolean() && !fieldPattern.equals("r") && !fieldPattern.equals("ra")) {
fieldPattern = fieldPattern + "*";
}
}

return new ExistsQueryBuilder(fieldPattern);
}

Expand Down
Loading