From c0bf2d7c5f86fc434d81a68503d4559cfc4e5d0c Mon Sep 17 00:00:00 2001 From: Rishabh Maurya Date: Thu, 21 Mar 2024 13:25:28 -0700 Subject: [PATCH] Update in javadocs for DerivedFieldSupportedTypes and DerivedFieldType Signed-off-by: Rishabh Maurya --- .../opensearch/index/mapper/DerivedFieldSupportedTypes.java | 5 +++++ .../java/org/opensearch/index/mapper/DerivedFieldType.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/index/mapper/DerivedFieldSupportedTypes.java b/server/src/main/java/org/opensearch/index/mapper/DerivedFieldSupportedTypes.java index b39de5788d98a..10b5c4a0f7157 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DerivedFieldSupportedTypes.java +++ b/server/src/main/java/org/opensearch/index/mapper/DerivedFieldSupportedTypes.java @@ -31,6 +31,11 @@ import java.util.function.Function; import java.util.stream.Collectors; +/** + * Contains logic to get the FieldMapper for a given type of derived field. Also, for a given type of derived field, + * it is used to create an IndexableField for the provided type and object. It is useful when indexing into + * lucene MemoryIndex in {@link org.opensearch.index.query.DerivedFieldQuery}. + */ enum DerivedFieldSupportedTypes { BOOLEAN("boolean", (name, context) -> { diff --git a/server/src/main/java/org/opensearch/index/mapper/DerivedFieldType.java b/server/src/main/java/org/opensearch/index/mapper/DerivedFieldType.java index 5fd18271aaf40..abdca7879cc94 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DerivedFieldType.java +++ b/server/src/main/java/org/opensearch/index/mapper/DerivedFieldType.java @@ -33,7 +33,7 @@ /** * MappedFieldType for Derived Fields - * Contains logic to different type of queries on derived fields + * Contains logic to execute different type of queries on a derived field of given type. * @opensearch.internal */ public final class DerivedFieldType extends MappedFieldType {