From 55b3f8e1446870c47db7f1ba43498d153c173b69 Mon Sep 17 00:00:00 2001 From: Alexander Koval Date: Sat, 25 Mar 2023 12:33:13 +0200 Subject: [PATCH] Drop useless search query runtimeMappings method --- elasticmagic/api/elasticmagic.api | 1 - .../commonMain/kotlin/dev/evo/elasticmagic/SearchQuery.kt | 6 ------ 2 files changed, 7 deletions(-) diff --git a/elasticmagic/api/elasticmagic.api b/elasticmagic/api/elasticmagic.api index 10e44d6ec5..be6394ae7a 100644 --- a/elasticmagic/api/elasticmagic.api +++ b/elasticmagic/api/elasticmagic.api @@ -72,7 +72,6 @@ public abstract class dev/evo/elasticmagic/BaseSearchQuery { public final fun routing (Ljava/lang/Long;)Ldev/evo/elasticmagic/BaseSearchQuery; public final fun routing (Ljava/lang/String;)Ldev/evo/elasticmagic/BaseSearchQuery; public final fun runtimeMappings (Ldev/evo/elasticmagic/SearchQuery$CLEAR;)Ldev/evo/elasticmagic/BaseSearchQuery; - public final fun runtimeMappings (Ldev/evo/elasticmagic/doc/RuntimeFields;)Ldev/evo/elasticmagic/BaseSearchQuery; public final fun runtimeMappings ([Ldev/evo/elasticmagic/doc/BoundRuntimeField;)Ldev/evo/elasticmagic/BaseSearchQuery; public final fun scriptFields (Ldev/evo/elasticmagic/SearchQuery$CLEAR;)Ldev/evo/elasticmagic/BaseSearchQuery; public final fun scriptFields ([Lkotlin/Pair;)Ldev/evo/elasticmagic/BaseSearchQuery; diff --git a/elasticmagic/src/commonMain/kotlin/dev/evo/elasticmagic/SearchQuery.kt b/elasticmagic/src/commonMain/kotlin/dev/evo/elasticmagic/SearchQuery.kt index 12e20d9599..7712febe06 100644 --- a/elasticmagic/src/commonMain/kotlin/dev/evo/elasticmagic/SearchQuery.kt +++ b/elasticmagic/src/commonMain/kotlin/dev/evo/elasticmagic/SearchQuery.kt @@ -4,7 +4,6 @@ import dev.evo.elasticmagic.aggs.Aggregation import dev.evo.elasticmagic.doc.BaseDocSource import dev.evo.elasticmagic.doc.BoundRuntimeField import dev.evo.elasticmagic.doc.DynDocSource -import dev.evo.elasticmagic.doc.RuntimeFields import dev.evo.elasticmagic.query.FieldFormat import dev.evo.elasticmagic.query.FieldOperations import dev.evo.elasticmagic.query.NodeHandle @@ -425,11 +424,6 @@ abstract class BaseSearchQuery>( fields.associateByTo(runtimeMappings, BoundRuntimeField<*>::getFieldName) } - fun runtimeMappings(fields: RuntimeFields): T = self { - fields.getAllFields().filterIsInstance>() - .associateByTo(runtimeMappings, BoundRuntimeField<*>::getFieldName) - } - @Suppress("UNUSED_PARAMETER") fun runtimeMappings(clear: SearchQuery.CLEAR): T = self { runtimeMappings.clear()