From f48357e46aa687ae0c47109046b334832a910f98 Mon Sep 17 00:00:00 2001 From: Rishabh Maurya Date: Wed, 3 Apr 2024 16:44:32 -0700 Subject: [PATCH] Add tests related to derived fields for QueryShardContext changes Signed-off-by: Rishabh Maurya --- .../index/mapper/DerivedFieldMapper.java | 2 +- .../index/query/QueryShardContextTests.java | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/index/mapper/DerivedFieldMapper.java b/server/src/main/java/org/opensearch/index/mapper/DerivedFieldMapper.java index b448487a4f810..d0adf9ebbd441 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DerivedFieldMapper.java +++ b/server/src/main/java/org/opensearch/index/mapper/DerivedFieldMapper.java @@ -37,7 +37,7 @@ private static DerivedFieldMapper toType(FieldMapper in) { */ public static class Builder extends ParametrizedFieldMapper.Builder { // TODO: The type of parameter may change here if the actual underlying FieldType object is needed - private final Parameter type = Parameter.stringParam("type", false, m -> toType(m).type, "text"); + private final Parameter type = Parameter.stringParam("type", false, m -> toType(m).type, "keyword"); private final Parameter