Skip to content

Commit

Permalink
Drop useless search query runtimeMappings method
Browse files Browse the repository at this point in the history
  • Loading branch information
anti-social committed Mar 25, 2023
1 parent ccd1141 commit 55b3f8e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
1 change: 0 additions & 1 deletion elasticmagic/api/elasticmagic.api
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -425,11 +424,6 @@ abstract class BaseSearchQuery<S: BaseDocSource, T: BaseSearchQuery<S, T>>(
fields.associateByTo(runtimeMappings, BoundRuntimeField<*>::getFieldName)
}

fun runtimeMappings(fields: RuntimeFields): T = self {
fields.getAllFields().filterIsInstance<BoundRuntimeField<*>>()
.associateByTo(runtimeMappings, BoundRuntimeField<*>::getFieldName)
}

@Suppress("UNUSED_PARAMETER")
fun runtimeMappings(clear: SearchQuery.CLEAR): T = self {
runtimeMappings.clear()
Expand Down

0 comments on commit 55b3f8e

Please sign in to comment.