From 3816c0d1ea318930be2bc33c4c99a1e87fbd11e5 Mon Sep 17 00:00:00 2001 From: Rishabh Maurya Date: Thu, 21 Mar 2024 13:13:57 -0700 Subject: [PATCH] Update javadocs Signed-off-by: Rishabh Maurya --- .../org/opensearch/index/mapper/DerivedFieldValueFetcher.java | 4 +++- .../main/java/org/opensearch/script/DerivedFieldScript.java | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/org/opensearch/index/mapper/DerivedFieldValueFetcher.java b/server/src/main/java/org/opensearch/index/mapper/DerivedFieldValueFetcher.java index 67f29bc6a14c0..7ce6a71bf14cb 100644 --- a/server/src/main/java/org/opensearch/index/mapper/DerivedFieldValueFetcher.java +++ b/server/src/main/java/org/opensearch/index/mapper/DerivedFieldValueFetcher.java @@ -16,7 +16,9 @@ import java.util.List; /** - * ValueFetcher used by Derived Fields. + * The value fetcher contains logic to execute script and fetch the value in form of List. + * It expects DerivedFieldScript.LeafFactory as an input and sets the contract with consumer to call + * {@link #setNextReader(LeafReaderContext)} whenever a segment is switched. */ public final class DerivedFieldValueFetcher implements ValueFetcher { private DerivedFieldScript derivedFieldScript; diff --git a/server/src/main/java/org/opensearch/script/DerivedFieldScript.java b/server/src/main/java/org/opensearch/script/DerivedFieldScript.java index 00090cb03b94b..b5d3b309b2182 100644 --- a/server/src/main/java/org/opensearch/script/DerivedFieldScript.java +++ b/server/src/main/java/org/opensearch/script/DerivedFieldScript.java @@ -45,6 +45,7 @@ /** * Definition of Script for DerivedField. + * It will be used to execute scripts defined against derived fields of any type * * @opensearch.internal */