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 @@ -361,6 +361,16 @@ public static EsRelation relation(IndexMode mode) {
*/
public static class TestSearchStats implements SearchStats {

private final boolean supportsLoaderConfig;

public TestSearchStats() {
this(true);
}

public TestSearchStats(boolean supportsLoaderConfig) {
this.supportsLoaderConfig = supportsLoaderConfig;
}

@Override
public boolean exists(FieldName field) {
return true;
Expand All @@ -387,7 +397,7 @@ public boolean supportsLoaderConfig(
BlockLoaderFunctionConfig config,
MappedFieldType.FieldExtractPreference preference
) {
return true;
return supportsLoaderConfig;
}

@Override
Expand Down Expand Up @@ -508,6 +518,11 @@ public static class TestSearchStatsWithMinMax extends TestSearchStats {
private final Map<String, Object> maxValues;

public TestSearchStatsWithMinMax(Map<String, Object> minValues, Map<String, Object> maxValues) {
this(minValues, maxValues, true);
}

public TestSearchStatsWithMinMax(Map<String, Object> minValues, Map<String, Object> maxValues, boolean supportsLoaderConfig) {
super(supportsLoaderConfig);
this.minValues = minValues;
this.maxValues = maxValues;
}
Expand Down
Loading