From 92b557c3e8796b0c6b9b99d9cc8ab01e5c82665d 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