From 3d53567d39238b339d47339be2d47d5762c9ffb0 Mon Sep 17 00:00:00 2001 From: m-Bilal Date: Thu, 8 Aug 2024 23:33:49 +0530 Subject: [PATCH] remove `date_range_query` as a comparison operator --- connector/static_types.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/connector/static_types.go b/connector/static_types.go index 44d37a2..e7165a1 100644 --- a/connector/static_types.go +++ b/connector/static_types.go @@ -306,10 +306,10 @@ func getComparisonOperatorDefinition(dataType string) map[string]schema.Comparis "terms": schema.NewComparisonOperatorCustom(schema.NewArrayType(schema.NewNamedType(dataType))).Encode(), } - if dataType == "date" { - requiredObjectTypes["date_range_query"] = objectTypeMap["date_range_query"] - comparisonOperators["range"] = schema.NewComparisonOperatorCustom(schema.NewNamedType("date_range_query")).Encode() - } + // if dataType == "date" { // TODO: add back once object types are supported as comparison operators + // requiredObjectTypes["date_range_query"] = objectTypeMap["date_range_query"] + // comparisonOperators["range"] = schema.NewComparisonOperatorCustom(schema.NewNamedType("date_range_query")).Encode() + // } if dataType == "text" { comparisonOperators["match_phrase_prefix"] = schema.NewComparisonOperatorCustom(schema.NewNamedType(dataType)).Encode()