From b3e7fb1e96248131c3db305fc3820258f194cc41 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 12:34:36 +0100 Subject: [PATCH 01/16] move prod classes --- .../xpack/runtimefields/fielddata/BinaryScriptFieldData.java | 0 .../xpack/runtimefields/fielddata/BooleanScriptDocValues.java | 0 .../xpack/runtimefields/fielddata/BooleanScriptFieldData.java | 0 .../xpack/runtimefields/fielddata/DateScriptFieldData.java | 0 .../xpack/runtimefields/fielddata/DoubleScriptDocValues.java | 0 .../xpack/runtimefields/fielddata/DoubleScriptFieldData.java | 0 .../xpack/runtimefields/fielddata/GeoPointScriptDocValues.java | 0 .../xpack/runtimefields/fielddata/GeoPointScriptFieldData.java | 0 .../xpack/runtimefields/fielddata/IpScriptDocValues.java | 0 .../xpack/runtimefields/fielddata/IpScriptFieldData.java | 0 .../xpack/runtimefields/fielddata/LongScriptDocValues.java | 0 .../xpack/runtimefields/fielddata/LongScriptFieldData.java | 0 .../xpack/runtimefields/fielddata/StringScriptDocValues.java | 0 .../xpack/runtimefields/fielddata/StringScriptFieldData.java | 0 .../xpack/runtimefields/mapper/AbstractFieldScript.java | 0 .../xpack/runtimefields/mapper/AbstractLongFieldScript.java | 0 .../xpack/runtimefields/mapper/AbstractScriptFieldType.java | 0 .../xpack/runtimefields/mapper/BooleanFieldScript.java | 0 .../xpack/runtimefields/mapper/BooleanScriptFieldType.java | 0 .../elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java | 0 .../xpack/runtimefields/mapper/DateScriptFieldType.java | 0 .../xpack/runtimefields/mapper/DoubleFieldScript.java | 0 .../xpack/runtimefields/mapper/DoubleScriptFieldType.java | 0 .../xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java | 0 .../xpack/runtimefields/mapper/GeoPointFieldScript.java | 0 .../xpack/runtimefields/mapper/GeoPointScriptFieldType.java | 0 .../elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java | 0 .../xpack/runtimefields/mapper/IpScriptFieldType.java | 0 .../xpack/runtimefields/mapper/KeywordScriptFieldType.java | 0 .../elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java | 0 .../xpack/runtimefields/mapper/LongScriptFieldType.java | 0 .../xpack/runtimefields/mapper/StringFieldScript.java | 0 .../runtimefields/query/AbstractBooleanScriptFieldQuery.java | 0 .../xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java | 0 .../runtimefields/query/AbstractGeoPointScriptFieldQuery.java | 0 .../xpack/runtimefields/query/AbstractIpScriptFieldQuery.java | 0 .../xpack/runtimefields/query/AbstractLongScriptFieldQuery.java | 0 .../xpack/runtimefields/query/AbstractScriptFieldQuery.java | 0 .../query/AbstractStringScriptFieldAutomatonQuery.java | 0 .../xpack/runtimefields/query/AbstractStringScriptFieldQuery.java | 0 .../xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java | 0 .../xpack/runtimefields/query/BooleanScriptFieldTermQuery.java | 0 .../xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java | 0 .../xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java | 0 .../xpack/runtimefields/query/DoubleScriptFieldTermQuery.java | 0 .../xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java | 0 .../query/GeoPointScriptFieldDistanceFeatureQuery.java | 0 .../xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java | 0 .../runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java | 0 .../xpack/runtimefields/query/IpScriptFieldExistsQuery.java | 0 .../xpack/runtimefields/query/IpScriptFieldRangeQuery.java | 0 .../xpack/runtimefields/query/IpScriptFieldTermQuery.java | 0 .../xpack/runtimefields/query/IpScriptFieldTermsQuery.java | 0 .../runtimefields/query/LongScriptFieldDistanceFeatureQuery.java | 0 .../xpack/runtimefields/query/LongScriptFieldExistsQuery.java | 0 .../xpack/runtimefields/query/LongScriptFieldRangeQuery.java | 0 .../xpack/runtimefields/query/LongScriptFieldTermQuery.java | 0 .../xpack/runtimefields/query/LongScriptFieldTermsQuery.java | 0 .../xpack/runtimefields/query/StringScriptFieldExistsQuery.java | 0 .../xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java | 0 .../xpack/runtimefields/query/StringScriptFieldPrefixQuery.java | 0 .../xpack/runtimefields/query/StringScriptFieldRangeQuery.java | 0 .../xpack/runtimefields/query/StringScriptFieldRegexpQuery.java | 0 .../xpack/runtimefields/query/StringScriptFieldTermQuery.java | 0 .../xpack/runtimefields/query/StringScriptFieldTermsQuery.java | 0 .../xpack/runtimefields/query/StringScriptFieldWildcardQuery.java | 0 66 files changed, 0 insertions(+), 0 deletions(-) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java (100%) diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java rename to server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java From 903fee06d2c29a5a7ce375213c5003d07e623b01 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 12:37:20 +0100 Subject: [PATCH 02/16] move test classes --- .../mapper/AbstractNonTextScriptFieldTypeTestCase.java | 0 .../runtimefields/mapper/AbstractScriptFieldTypeTestCase.java | 0 .../xpack/runtimefields/mapper/BooleanFieldScriptTests.java | 0 .../xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java | 0 .../xpack/runtimefields/mapper/DateFieldScriptTests.java | 0 .../xpack/runtimefields/mapper/DateScriptFieldTypeTests.java | 0 .../xpack/runtimefields/mapper/DoubleFieldScriptTests.java | 0 .../xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java | 0 .../xpack/runtimefields/mapper/DynamicRuntimeTests.java | 0 .../xpack/runtimefields/mapper/FieldScriptTestCase.java | 0 .../xpack/runtimefields/mapper/GeoPointFieldScriptTests.java | 0 .../xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java | 0 .../xpack/runtimefields/mapper/IpFieldScriptTests.java | 0 .../xpack/runtimefields/mapper/IpScriptFieldTypeTests.java | 0 .../xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java | 0 .../xpack/runtimefields/mapper/LongFieldScriptTests.java | 0 .../xpack/runtimefields/mapper/LongScriptFieldTypeTests.java | 0 .../xpack/runtimefields/mapper/StringFieldScriptTests.java | 0 .../xpack/runtimefields/mapper/TestScriptEngine.java | 0 .../query/AbstractBooleanScriptFieldQueryTestCase.java | 0 .../query/AbstractDoubleScriptFieldQueryTestCase.java | 0 .../query/AbstractGeoPointScriptFieldQueryTestCase.java | 0 .../runtimefields/query/AbstractIpScriptFieldQueryTestCase.java | 0 .../query/AbstractLongScriptFieldQueryTestCase.java | 0 .../runtimefields/query/AbstractScriptFieldQueryTestCase.java | 0 .../xpack/runtimefields/query/AbstractScriptFieldQueryTests.java | 0 .../query/AbstractStringScriptFieldQueryTestCase.java | 0 .../runtimefields/query/BooleanScriptFieldExistsQueryTests.java | 0 .../runtimefields/query/BooleanScriptFieldTermQueryTests.java | 0 .../runtimefields/query/DoubleScriptFieldExistsQueryTests.java | 0 .../runtimefields/query/DoubleScriptFieldRangeQueryTests.java | 0 .../runtimefields/query/DoubleScriptFieldTermQueryTests.java | 0 .../runtimefields/query/DoubleScriptFieldTermsQueryTests.java | 0 .../query/GeoPointScriptFieldDistanceFeatureQueryTests.java | 0 .../runtimefields/query/GeoPointScriptFieldExistsQueryTests.java | 0 .../query/GeoPointScriptFieldGeoShapeQueryTests.java | 0 .../xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java | 0 .../xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java | 0 .../xpack/runtimefields/query/IpScriptFieldTermQueryTests.java | 0 .../xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java | 0 .../query/LongScriptFieldDistanceFeatureQueryTests.java | 0 .../runtimefields/query/LongScriptFieldExistsQueryTests.java | 0 .../runtimefields/query/LongScriptFieldRangeQueryTests.java | 0 .../xpack/runtimefields/query/LongScriptFieldTermQueryTests.java | 0 .../runtimefields/query/LongScriptFieldTermsQueryTests.java | 1 - .../runtimefields/query/StringScriptFieldExistsQueryTests.java | 0 .../runtimefields/query/StringScriptFieldFuzzyQueryTests.java | 0 .../runtimefields/query/StringScriptFieldPrefixQueryTests.java | 0 .../runtimefields/query/StringScriptFieldRangeQueryTests.java | 0 .../runtimefields/query/StringScriptFieldRegexpQueryTests.java | 0 .../runtimefields/query/StringScriptFieldTermQueryTests.java | 0 .../runtimefields/query/StringScriptFieldTermsQueryTests.java | 0 .../runtimefields/query/StringScriptFieldWildcardQueryTests.java | 0 53 files changed, 1 deletion(-) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java (99%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java (100%) rename {x-pack/plugin/runtime-fields => server}/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java (100%) diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java similarity index 99% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java index 78be4eedef47a..a9ab7c2b5887b 100644 --- a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java @@ -9,7 +9,6 @@ import com.carrotsearch.hppc.LongHashSet; import com.carrotsearch.hppc.LongSet; - import org.elasticsearch.script.Script; import static org.hamcrest.Matchers.equalTo; diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java diff --git a/x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java similarity index 100% rename from x-pack/plugin/runtime-fields/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java rename to server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java From c06adee0c11484e036c525e0743be1edb7713c98 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 12:49:54 +0100 Subject: [PATCH 03/16] update license header --- .../runtimefields/fielddata/BinaryScriptFieldData.java | 5 +++-- .../runtimefields/fielddata/BooleanScriptDocValues.java | 5 +++-- .../runtimefields/fielddata/BooleanScriptFieldData.java | 5 +++-- .../xpack/runtimefields/fielddata/DateScriptFieldData.java | 5 +++-- .../runtimefields/fielddata/DoubleScriptDocValues.java | 5 +++-- .../runtimefields/fielddata/DoubleScriptFieldData.java | 5 +++-- .../runtimefields/fielddata/GeoPointScriptDocValues.java | 5 +++-- .../runtimefields/fielddata/GeoPointScriptFieldData.java | 5 +++-- .../xpack/runtimefields/fielddata/IpScriptDocValues.java | 5 +++-- .../xpack/runtimefields/fielddata/IpScriptFieldData.java | 5 +++-- .../xpack/runtimefields/fielddata/LongScriptDocValues.java | 5 +++-- .../xpack/runtimefields/fielddata/LongScriptFieldData.java | 5 +++-- .../runtimefields/fielddata/StringScriptDocValues.java | 5 +++-- .../runtimefields/fielddata/StringScriptFieldData.java | 5 +++-- .../xpack/runtimefields/mapper/AbstractFieldScript.java | 5 +++-- .../xpack/runtimefields/mapper/AbstractLongFieldScript.java | 5 +++-- .../xpack/runtimefields/mapper/AbstractScriptFieldType.java | 5 +++-- .../xpack/runtimefields/mapper/BooleanFieldScript.java | 5 +++-- .../xpack/runtimefields/mapper/BooleanScriptFieldType.java | 5 +++-- .../xpack/runtimefields/mapper/DateFieldScript.java | 5 +++-- .../xpack/runtimefields/mapper/DateScriptFieldType.java | 5 +++-- .../xpack/runtimefields/mapper/DoubleFieldScript.java | 5 +++-- .../xpack/runtimefields/mapper/DoubleScriptFieldType.java | 5 +++-- .../runtimefields/mapper/DynamicRuntimeFieldsBuilder.java | 5 +++-- .../xpack/runtimefields/mapper/GeoPointFieldScript.java | 5 +++-- .../xpack/runtimefields/mapper/GeoPointScriptFieldType.java | 5 +++-- .../xpack/runtimefields/mapper/IpFieldScript.java | 5 +++-- .../xpack/runtimefields/mapper/IpScriptFieldType.java | 5 +++-- .../xpack/runtimefields/mapper/KeywordScriptFieldType.java | 5 +++-- .../xpack/runtimefields/mapper/LongFieldScript.java | 5 +++-- .../xpack/runtimefields/mapper/LongScriptFieldType.java | 5 +++-- .../xpack/runtimefields/mapper/StringFieldScript.java | 5 +++-- .../query/AbstractBooleanScriptFieldQuery.java | 5 +++-- .../runtimefields/query/AbstractDoubleScriptFieldQuery.java | 5 +++-- .../query/AbstractGeoPointScriptFieldQuery.java | 5 +++-- .../runtimefields/query/AbstractIpScriptFieldQuery.java | 5 +++-- .../runtimefields/query/AbstractLongScriptFieldQuery.java | 5 +++-- .../xpack/runtimefields/query/AbstractScriptFieldQuery.java | 5 +++-- .../query/AbstractStringScriptFieldAutomatonQuery.java | 5 +++-- .../runtimefields/query/AbstractStringScriptFieldQuery.java | 5 +++-- .../runtimefields/query/BooleanScriptFieldExistsQuery.java | 5 +++-- .../runtimefields/query/BooleanScriptFieldTermQuery.java | 5 +++-- .../runtimefields/query/DoubleScriptFieldExistsQuery.java | 5 +++-- .../runtimefields/query/DoubleScriptFieldRangeQuery.java | 5 +++-- .../runtimefields/query/DoubleScriptFieldTermQuery.java | 5 +++-- .../runtimefields/query/DoubleScriptFieldTermsQuery.java | 6 +++--- .../query/GeoPointScriptFieldDistanceFeatureQuery.java | 5 +++-- .../runtimefields/query/GeoPointScriptFieldExistsQuery.java | 5 +++-- .../query/GeoPointScriptFieldGeoShapeQuery.java | 5 +++-- .../xpack/runtimefields/query/IpScriptFieldExistsQuery.java | 5 +++-- .../xpack/runtimefields/query/IpScriptFieldRangeQuery.java | 5 +++-- .../xpack/runtimefields/query/IpScriptFieldTermQuery.java | 5 +++-- .../xpack/runtimefields/query/IpScriptFieldTermsQuery.java | 5 +++-- .../query/LongScriptFieldDistanceFeatureQuery.java | 5 +++-- .../runtimefields/query/LongScriptFieldExistsQuery.java | 5 +++-- .../runtimefields/query/LongScriptFieldRangeQuery.java | 5 +++-- .../xpack/runtimefields/query/LongScriptFieldTermQuery.java | 5 +++-- .../runtimefields/query/LongScriptFieldTermsQuery.java | 5 +++-- .../runtimefields/query/StringScriptFieldExistsQuery.java | 5 +++-- .../runtimefields/query/StringScriptFieldFuzzyQuery.java | 5 +++-- .../runtimefields/query/StringScriptFieldPrefixQuery.java | 5 +++-- .../runtimefields/query/StringScriptFieldRangeQuery.java | 5 +++-- .../runtimefields/query/StringScriptFieldRegexpQuery.java | 5 +++-- .../runtimefields/query/StringScriptFieldTermQuery.java | 5 +++-- .../runtimefields/query/StringScriptFieldTermsQuery.java | 5 +++-- .../runtimefields/query/StringScriptFieldWildcardQuery.java | 5 +++-- .../mapper/AbstractNonTextScriptFieldTypeTestCase.java | 5 +++-- .../mapper/AbstractScriptFieldTypeTestCase.java | 5 +++-- .../xpack/runtimefields/mapper/BooleanFieldScriptTests.java | 5 +++-- .../runtimefields/mapper/BooleanScriptFieldTypeTests.java | 5 +++-- .../xpack/runtimefields/mapper/DateFieldScriptTests.java | 5 +++-- .../runtimefields/mapper/DateScriptFieldTypeTests.java | 5 +++-- .../xpack/runtimefields/mapper/DoubleFieldScriptTests.java | 5 +++-- .../runtimefields/mapper/DoubleScriptFieldTypeTests.java | 5 +++-- .../xpack/runtimefields/mapper/DynamicRuntimeTests.java | 5 +++-- .../xpack/runtimefields/mapper/FieldScriptTestCase.java | 5 +++-- .../runtimefields/mapper/GeoPointFieldScriptTests.java | 5 +++-- .../runtimefields/mapper/GeoPointScriptFieldTypeTests.java | 5 +++-- .../xpack/runtimefields/mapper/IpFieldScriptTests.java | 5 +++-- .../xpack/runtimefields/mapper/IpScriptFieldTypeTests.java | 5 +++-- .../runtimefields/mapper/KeywordScriptFieldTypeTests.java | 5 +++-- .../xpack/runtimefields/mapper/LongFieldScriptTests.java | 5 +++-- .../runtimefields/mapper/LongScriptFieldTypeTests.java | 5 +++-- .../xpack/runtimefields/mapper/StringFieldScriptTests.java | 5 +++-- .../xpack/runtimefields/mapper/TestScriptEngine.java | 5 +++-- .../query/AbstractBooleanScriptFieldQueryTestCase.java | 5 +++-- .../query/AbstractDoubleScriptFieldQueryTestCase.java | 5 +++-- .../query/AbstractGeoPointScriptFieldQueryTestCase.java | 5 +++-- .../query/AbstractIpScriptFieldQueryTestCase.java | 5 +++-- .../query/AbstractLongScriptFieldQueryTestCase.java | 5 +++-- .../query/AbstractScriptFieldQueryTestCase.java | 5 +++-- .../runtimefields/query/AbstractScriptFieldQueryTests.java | 5 +++-- .../query/AbstractStringScriptFieldQueryTestCase.java | 5 +++-- .../query/BooleanScriptFieldExistsQueryTests.java | 5 +++-- .../query/BooleanScriptFieldTermQueryTests.java | 5 +++-- .../query/DoubleScriptFieldExistsQueryTests.java | 5 +++-- .../query/DoubleScriptFieldRangeQueryTests.java | 5 +++-- .../query/DoubleScriptFieldTermQueryTests.java | 5 +++-- .../query/DoubleScriptFieldTermsQueryTests.java | 5 +++-- .../query/GeoPointScriptFieldDistanceFeatureQueryTests.java | 5 +++-- .../query/GeoPointScriptFieldExistsQueryTests.java | 5 +++-- .../query/GeoPointScriptFieldGeoShapeQueryTests.java | 5 +++-- .../runtimefields/query/IpScriptFieldExistsQueryTests.java | 5 +++-- .../runtimefields/query/IpScriptFieldRangeQueryTests.java | 5 +++-- .../runtimefields/query/IpScriptFieldTermQueryTests.java | 5 +++-- .../runtimefields/query/IpScriptFieldTermsQueryTests.java | 5 +++-- .../query/LongScriptFieldDistanceFeatureQueryTests.java | 5 +++-- .../query/LongScriptFieldExistsQueryTests.java | 5 +++-- .../runtimefields/query/LongScriptFieldRangeQueryTests.java | 5 +++-- .../runtimefields/query/LongScriptFieldTermQueryTests.java | 5 +++-- .../runtimefields/query/LongScriptFieldTermsQueryTests.java | 5 +++-- .../query/StringScriptFieldExistsQueryTests.java | 5 +++-- .../query/StringScriptFieldFuzzyQueryTests.java | 5 +++-- .../query/StringScriptFieldPrefixQueryTests.java | 5 +++-- .../query/StringScriptFieldRangeQueryTests.java | 5 +++-- .../query/StringScriptFieldRegexpQueryTests.java | 5 +++-- .../query/StringScriptFieldTermQueryTests.java | 5 +++-- .../query/StringScriptFieldTermsQueryTests.java | 5 +++-- .../query/StringScriptFieldWildcardQueryTests.java | 5 +++-- 119 files changed, 357 insertions(+), 239 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java index f6a07d17b8846..26ad66288a072 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java index 5d9f5d6c9d0f6..3fe3a33c7811b 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java index 61f5007df6bd3..15827d2deb33b 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java index 8b63e0e47db9b..151977a38403b 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java index 06c280c6f37b7..24a960526a614 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java index 893c02890df2a..52ed4b2eabe1b 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java index e41d02548a1a2..5c17da13c8b16 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java index 34a2c570573d6..ba0bad3b71bc2 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java index 21c4d83aa07f8..8bf55c02b9b0c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java index 8860584bd573d..61f5335b606e2 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java index 9cec6d5a263bf..bfd67b167f774 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java index cca70e50a3a37..35025bae80bdf 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java index 4c5efadbe361b..e16fcf0b3c956 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java index aa53287878756..6c6d0ead354a1 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.fielddata; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java index 9607916a4b783..31b4f5a0dcc42 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java index 8d153a7940982..8cbe4cc14fe2c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java index a16db46806025..5a43962730f76 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java index d79fe285bb449..5d8c4cd319790 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java index 8fd3f16420e39..262685f63dd25 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java index 5cfcce25a48c0..2e953183bf9c1 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java index a07b581450334..2504c1dbabbf9 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java index c2e64c87c8563..1434bdf77aa05 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java index 885ae743d0a4c..82d7e6507b789 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java index d7ad87609a675..6366b6cbf1c0c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java index ed022b760671e..b697aae9103f2 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java index 7f1ae78801423..433f76460994a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java index deaa2e74864a5..08df2409713eb 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java index 4317790954526..28e1d2eb093df 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java index ffe9dab983a55..8948b6aec7557 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java index 81bf4c2bf614b..42ecdbb910fcc 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java index 65d43723cfcc1..4868d19a1a304 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java index c61fdc7996f2c..05beb6f9c1031 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java index 8b00c3e8980f8..6efc16249cdc3 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java index 5fc3caabe4982..f16080599cbc6 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java index a3764f148f287..13a3e590bab3d 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java index ff28903d0da00..698490ca4a945 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java index aaf137ee5ece6..62bb3d439456a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java index 5a9898ea64c34..a77372a2b7691 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java index 2fb73ed436b15..a4936361f3cf3 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java index a3e954a0fde67..34740524dcd7a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java index ba111dc4ebc0a..97ad49d09b3a1 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java index 23bd3fb307428..5f1ef90d516b5 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java index 1be31bde40c42..5af26d52f6b07 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java index b90a7a2424f19..a502f3b8ecc02 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java index 8a2485936d6dd..07067537f1aef 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java index 41ce19d0dda48..9e418faa9d6bc 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java @@ -1,9 +1,9 @@ -/* /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java index 4829833127812..2ec18fff15362 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java index 11ae1b2e50bff..cd2ec69629099 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java index 03c8edcda4631..84681cd93404a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java index d8f052eea2a06..36da904d5510e 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java index 371d3815cb606..0de6a1e97e6de 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java index 4b7282a9c5b5e..dae00815681d1 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java index ceabc23203cd3..7bbe3d380bd03 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java index 3efafafbf60d8..2d5eff669923f 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java index 3ecda862e896b..8324b631e010e 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java index aac133fc87e7e..f008b12d05237 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java index ce27f92c3c026..16fcb6fe64e7a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java index cc1bdb6ba0381..06ae7ccc8824a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java index f9799d5ce6c91..9cda2eab959e3 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java index 34d8b3b9257b3..b1188684b96f4 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java index 04caf6bfc6d58..11d5a9400d0fa 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java index 032ddfedcb66a..02d3e07fd5948 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java index fba79b5f38a0f..ffb018dfea318 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java index 7096fbae6c437..a48f0eb24924e 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java index c2a867b909533..32ae16aebbde3 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java index 069124795f397..fc156945d37c5 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java +++ b/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java index bb07fdcdc45e9..1c61009ea91b7 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java index 74e645fc4da33..537429370b66c 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java index e7bfe7eade8d1..7cc22d1fce863 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java index 0981dad711d76..311f9feb0853d 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java index 2e15525fdaf02..3be6a0fc157de 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java index 1aaaba89614f3..d1cb3a53daf0e 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java index be569a7b21381..c7198dbb74b48 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java index f036330929bbc..c178dfce5a2cb 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java index eabc7a87f59a9..933079f97a763 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java index 9f2d6051ab0a2..64bfa51361986 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java index 81783400995bf..823df40f876a7 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java index 2cb9145c18165..bbe46d42f4ce3 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java index 76891d580b937..3555e57ca49f1 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java index 6976f6e107f8f..a435a9de62e37 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java index da7f64781bb11..c41647f03512c 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java index 327459f2511b7..a68596c78a686 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java index 7d9e72272ae0d..1ed30226fae4c 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java index d1f0210abf6c7..283e52c907a6b 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java index 1bf3284f2b460..fdbba866ab02e 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.mapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java index 0feac1da54483..2700a2293bf83 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java index 62999e032a464..27a2c96455650 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java index 90d6349febfa1..3093bf809e519 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java index 37f046000a1b2..6e9fa97c39128 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java index b4c2cfbbec252..f2b1875929772 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java index 63c41ed467732..4b734898bdb03 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java index 303fe78df5f9e..2b28749096923 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java index 78e75c6a217b6..77d270b362a12 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java index fd822473a74c6..6aac7505f8984 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java index 99c8749564e43..bcde6d0969a74 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java index a77d23c65ef72..df9c6dd1bdd04 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java index 5143766f58bcd..2e5d05077c0c8 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java index 9b9e9fe7036dd..263bae6cc2008 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java index 85d7832e5c235..3384688736aa2 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java index 5e84ad5581af1..b2cc1f41ff11c 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java index c2a30c49960cc..d5ba441194e02 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java index f82daa1087611..69d807b7c6c18 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java index 8b9cd4b49c042..2a4925f405743 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java index 67bc3375697fa..8dbf4c5999177 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java index 0f04837ae74bc..34ec1bc258ae9 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java index 69208db25d46f..160f07ccf8940 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java index fb2c24e7e7cd5..5cb929cb75973 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java index 5bf18e81ce71d..653c8b3436353 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java index 6c2549d51a967..7c9f91c9bcaf6 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java index 68498f352ce2d..030ffce0d9360 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java index a9ab7c2b5887b..acd76bfc44aae 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java index d28d7ac5633b8..8e9b80ae89dfa 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java index 58bcf2ea0055b..f63c1b711c214 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java index 3904cad0f4978..c2d6053ffc78b 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java index 3a1736740ff04..dfa6548c94411 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java index f7c4a29243a71..6c2fe213bda93 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java index 20162bf981b1d..889b264d00c54 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java index 4432bb320f1e4..bd2b63d518912 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java index 2c4f08e935804..b8f3638303261 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java @@ -1,8 +1,9 @@ /* * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. */ package org.elasticsearch.xpack.runtimefields.query; From 150417dbde7df4fcc7940f3c6db7027221a12d02 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 13:02:33 +0100 Subject: [PATCH 04/16] remove runtime fields plugin mention from tests --- .../mapper/AbstractScriptFieldTypeTestCase.java | 4 ++-- .../mapper/BooleanScriptFieldTypeTests.java | 3 +-- .../runtimefields/mapper/DateScriptFieldTypeTests.java | 3 +-- .../runtimefields/mapper/DoubleScriptFieldTypeTests.java | 3 +-- .../xpack/runtimefields/mapper/DynamicRuntimeTests.java | 9 --------- .../mapper/GeoPointScriptFieldTypeTests.java | 3 +-- .../runtimefields/mapper/IpScriptFieldTypeTests.java | 3 +-- .../mapper/KeywordScriptFieldTypeTests.java | 3 +-- .../runtimefields/mapper/LongScriptFieldTypeTests.java | 3 +-- 9 files changed, 9 insertions(+), 25 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java index 537429370b66c..6ece6c57bcafd 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java @@ -30,7 +30,6 @@ import org.elasticsearch.script.ScriptContext; import org.elasticsearch.script.ScriptEngine; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import java.io.IOException; import java.util.Collection; @@ -315,7 +314,7 @@ protected final void minimalMapping(XContentBuilder b) throws IOException { @Override protected Collection getPlugins() { - return List.of(new RuntimeFields(Settings.EMPTY), new TestScriptPlugin()); + return List.of(new TestScriptPlugin()); } private static class TestScriptPlugin extends Plugin implements ScriptPlugin { @@ -348,6 +347,7 @@ protected Object buildScriptFactory(ScriptContext context) { throw new IllegalArgumentException("Unsupported context: " + context); } + @Override public Set> getSupportedContexts() { return Set.copyOf(new RuntimeFields(Settings.EMPTY).getContexts()); } diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java index 311f9feb0853d..4ebf2ba9853b3 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java @@ -50,7 +50,6 @@ import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import org.elasticsearch.xpack.runtimefields.fielddata.BooleanScriptFieldData; import java.io.IOException; @@ -466,7 +465,7 @@ public void execute() { }; } }; - ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin, new RuntimeFields(Settings.EMPTY))); + ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin)); try (ScriptService scriptService = new ScriptService(Settings.EMPTY, scriptModule.engines, scriptModule.contexts)) { BooleanFieldScript.Factory factory = scriptService.compile(script, BooleanFieldScript.CONTEXT); return new BooleanScriptFieldType("test", factory, script, emptyMap(), (b, d) -> {}); diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java index d1cb3a53daf0e..a5a673e951e27 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java @@ -52,7 +52,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import org.elasticsearch.xpack.runtimefields.fielddata.DateScriptFieldData; import java.io.IOException; @@ -550,7 +549,7 @@ public void execute() { }; } }; - ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin, new RuntimeFields(Settings.EMPTY))); + ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin)); try (ScriptService scriptService = new ScriptService(Settings.EMPTY, scriptModule.engines, scriptModule.contexts)) { DateFieldScript.Factory factory = scriptService.compile(script, DateFieldScript.CONTEXT); return new DateScriptFieldType("test", factory, dateTimeFormatter, script, emptyMap(), (b, d) -> {}); diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java index c178dfce5a2cb..a7e1cfc4a3a9c 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java @@ -40,7 +40,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import org.elasticsearch.xpack.runtimefields.fielddata.DoubleScriptFieldData; import java.io.IOException; @@ -308,7 +307,7 @@ public void execute() { }; } }; - ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin, new RuntimeFields(Settings.EMPTY))); + ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin)); try (ScriptService scriptService = new ScriptService(Settings.EMPTY, scriptModule.engines, scriptModule.contexts)) { DoubleFieldScript.Factory factory = scriptService.compile(script, DoubleFieldScript.CONTEXT); return new DoubleScriptFieldType("test", factory, script, emptyMap(), (b, d) -> {}); diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java index 933079f97a763..bed60e5124e5c 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java @@ -9,23 +9,14 @@ package org.elasticsearch.xpack.runtimefields.mapper; import org.elasticsearch.common.Strings; -import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.mapper.DocumentMapper; import org.elasticsearch.index.mapper.MapperServiceTestCase; import org.elasticsearch.index.mapper.ObjectMapper; import org.elasticsearch.index.mapper.ParsedDocument; -import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import java.io.IOException; -import java.util.Collection; -import java.util.Collections; public class DynamicRuntimeTests extends MapperServiceTestCase { - @Override - protected Collection getPlugins() { - return Collections.singletonList(new RuntimeFields(Settings.EMPTY)); - } public void testDynamicLeafFields() throws IOException { DocumentMapper documentMapper = createDocumentMapper(topMapping(b -> b.field("dynamic", ObjectMapper.Dynamic.RUNTIME))); diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java index bbe46d42f4ce3..ad9f8ab6b3c55 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java @@ -39,7 +39,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import org.elasticsearch.xpack.runtimefields.fielddata.GeoPointScriptFieldData; import java.io.IOException; @@ -268,7 +267,7 @@ public void execute() { }; } }; - ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin, new RuntimeFields(Settings.EMPTY))); + ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin)); try (ScriptService scriptService = new ScriptService(Settings.EMPTY, scriptModule.engines, scriptModule.contexts)) { GeoPointFieldScript.Factory factory = scriptService.compile(script, GeoPointFieldScript.CONTEXT); return new GeoPointScriptFieldType("test", factory, script, emptyMap(), (b, d) -> {}); diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java index a435a9de62e37..7945d5f53b8b9 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java @@ -40,7 +40,6 @@ import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import org.elasticsearch.xpack.runtimefields.fielddata.BinaryScriptFieldData; import org.elasticsearch.xpack.runtimefields.fielddata.IpScriptFieldData; @@ -325,7 +324,7 @@ public void execute() { }; } }; - ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin, new RuntimeFields(Settings.EMPTY))); + ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin)); try (ScriptService scriptService = new ScriptService(Settings.EMPTY, scriptModule.engines, scriptModule.contexts)) { IpFieldScript.Factory factory = scriptService.compile(script, IpFieldScript.CONTEXT); return new IpScriptFieldType("test", factory, script, emptyMap(), (b, d) -> {}); diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java index c41647f03512c..8321258311c60 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java @@ -43,7 +43,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import org.elasticsearch.xpack.runtimefields.fielddata.BinaryScriptFieldData; import org.elasticsearch.xpack.runtimefields.fielddata.StringScriptFieldData; @@ -440,7 +439,7 @@ public void execute() { }; } }; - ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin, new RuntimeFields(Settings.EMPTY))); + ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin)); try (ScriptService scriptService = new ScriptService(Settings.EMPTY, scriptModule.engines, scriptModule.contexts)) { StringFieldScript.Factory factory = scriptService.compile(script, StringFieldScript.CONTEXT); return new KeywordScriptFieldType("test", factory, script, emptyMap(), (b, d) -> {}); diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java index 1ed30226fae4c..053c5cefb0b1e 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java @@ -44,7 +44,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.RuntimeFields; import org.elasticsearch.xpack.runtimefields.fielddata.LongScriptFieldData; import java.io.IOException; @@ -353,7 +352,7 @@ public void execute() { }; } }; - ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin, new RuntimeFields(Settings.EMPTY))); + ScriptModule scriptModule = new ScriptModule(Settings.EMPTY, List.of(scriptPlugin)); try (ScriptService scriptService = new ScriptService(Settings.EMPTY, scriptModule.engines, scriptModule.contexts)) { LongFieldScript.Factory factory = scriptService.compile(script, LongFieldScript.CONTEXT); return new LongScriptFieldType("test", factory, script, emptyMap(), (b, d) -> {}); From 4b2861a7ff2f6fe2426da3d87acc97ccab0c44dd Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 13:33:43 +0100 Subject: [PATCH 05/16] remove dynamic runtime fields builder extension point --- .../index/mapper/DocumentParser.java | 21 +++++----- .../mapper/DynamicRuntimeFieldsBuilder.java | 2 - .../elasticsearch/index/mapper/Mapper.java | 13 ++---- .../index/mapper/MapperService.java | 4 +- .../index/mapper/ObjectMapper.java | 4 -- .../index/mapper/ParseContext.java | 2 - .../elasticsearch/indices/IndicesModule.java | 16 +------ .../indices/mapper/MapperRegistry.java | 8 ---- .../elasticsearch/plugins/MapperPlugin.java | 9 ---- .../metadata/IndexMetadataVerifierTests.java | 2 +- .../elasticsearch/index/codec/CodecTests.java | 2 +- .../index/mapper/MappingParserTests.java | 2 +- .../index/mapper/ParametrizedMapperTests.java | 2 +- .../index/mapper/TestRuntimeField.java | 31 -------------- .../index/mapper/TypeParsersTests.java | 4 +- .../query/SearchExecutionContextTests.java | 3 +- .../indices/IndicesModuleTests.java | 42 ------------------- .../AbstractScriptFieldTypeTestCase.java | 3 +- .../aggregations/AggregatorTestCase.java | 4 +- .../xpack/runtimefields/RuntimeFields.java | 6 --- 20 files changed, 27 insertions(+), 153 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java b/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java index 8d4ef0f482a32..c73272f681d11 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java @@ -8,14 +8,6 @@ package org.elasticsearch.index.mapper; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Iterator; -import java.util.List; -import java.util.function.Function; - import org.apache.lucene.document.Field; import org.apache.lucene.index.IndexableField; import org.apache.lucene.search.Query; @@ -31,6 +23,14 @@ import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.index.query.SearchExecutionContext; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; + /** A parser for documents, given mappings from a DocumentMapper */ final class DocumentParser { @@ -39,11 +39,10 @@ final class DocumentParser { private final DynamicRuntimeFieldsBuilder dynamicRuntimeFieldsBuilder; DocumentParser(NamedXContentRegistry xContentRegistry, - Function dateParserContext, - DynamicRuntimeFieldsBuilder dynamicRuntimeFieldsBuilder) { + Function dateParserContext) { this.xContentRegistry = xContentRegistry; this.dateParserContext = dateParserContext; - this.dynamicRuntimeFieldsBuilder = dynamicRuntimeFieldsBuilder; + this.dynamicRuntimeFieldsBuilder = org.elasticsearch.xpack.runtimefields.mapper.DynamicRuntimeFieldsBuilder.INSTANCE; } ParsedDocument parseDocument(SourceToParse source, diff --git a/server/src/main/java/org/elasticsearch/index/mapper/DynamicRuntimeFieldsBuilder.java b/server/src/main/java/org/elasticsearch/index/mapper/DynamicRuntimeFieldsBuilder.java index 2d30024761b39..54836e1ee0479 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/DynamicRuntimeFieldsBuilder.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/DynamicRuntimeFieldsBuilder.java @@ -9,7 +9,6 @@ package org.elasticsearch.index.mapper; import org.elasticsearch.common.time.DateFormatter; -import org.elasticsearch.plugins.MapperPlugin; import static org.elasticsearch.index.mapper.ObjectMapper.Dynamic; @@ -18,7 +17,6 @@ * Plugins that provide runtime field implementations can also plug in their implementation of this interface * to define how leaf fields of each supported type can be dynamically created in dynamic runtime mode. * - * @see MapperPlugin#getDynamicRuntimeFieldsBuilder() * @see Dynamic */ public interface DynamicRuntimeFieldsBuilder { diff --git a/server/src/main/java/org/elasticsearch/index/mapper/Mapper.java b/server/src/main/java/org/elasticsearch/index/mapper/Mapper.java index 6ca146bfd5afc..e8c073562ce1e 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/Mapper.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/Mapper.java @@ -49,7 +49,6 @@ class ParserContext { private final Function similarityLookupService; private final Function typeParsers; private final Function runtimeTypeParsers; - private final boolean supportsDynamicRuntimeMappings; private final Version indexVersionCreated; private final Supplier searchExecutionContextSupplier; private final DateFormatter dateFormatter; @@ -67,8 +66,7 @@ public ParserContext(Function similarityLookupServic ScriptService scriptService, IndexAnalyzers indexAnalyzers, IndexSettings indexSettings, - BooleanSupplier idFieldDataEnabled, - boolean supportsDynamicRuntimeMappings) { + BooleanSupplier idFieldDataEnabled) { this.similarityLookupService = similarityLookupService; this.typeParsers = typeParsers; this.runtimeTypeParsers = runtimeTypeParsers; @@ -79,7 +77,6 @@ public ParserContext(Function similarityLookupServic this.indexAnalyzers = indexAnalyzers; this.indexSettings = indexSettings; this.idFieldDataEnabled = idFieldDataEnabled; - this.supportsDynamicRuntimeMappings = supportsDynamicRuntimeMappings; } public IndexAnalyzers getIndexAnalyzers() { @@ -110,10 +107,6 @@ public RuntimeFieldType.Parser runtimeFieldTypeParser(String type) { return runtimeTypeParsers.apply(type); } - public boolean supportsDynamicRuntimeMappings() { - return supportsDynamicRuntimeMappings; - } - public Version indexVersionCreated() { return indexVersionCreated; } @@ -159,7 +152,7 @@ private static class MultiFieldParserContext extends ParserContext { MultiFieldParserContext(ParserContext in) { super(in.similarityLookupService, in.typeParsers, in.runtimeTypeParsers, in.indexVersionCreated, in.searchExecutionContextSupplier, in.dateFormatter, in.scriptService, in.indexAnalyzers, in.indexSettings, - in.idFieldDataEnabled, in.supportsDynamicRuntimeMappings); + in.idFieldDataEnabled); } @Override @@ -170,7 +163,7 @@ private static class DynamicTemplateParserContext extends ParserContext { DynamicTemplateParserContext(ParserContext in) { super(in.similarityLookupService, in.typeParsers, in.runtimeTypeParsers, in.indexVersionCreated, in.searchExecutionContextSupplier, in.dateFormatter, in.scriptService, in.indexAnalyzers, in.indexSettings, - in.idFieldDataEnabled, in.supportsDynamicRuntimeMappings); + in.idFieldDataEnabled); } @Override diff --git a/server/src/main/java/org/elasticsearch/index/mapper/MapperService.java b/server/src/main/java/org/elasticsearch/index/mapper/MapperService.java index d4da272567971..8ca8b238340c6 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/MapperService.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/MapperService.java @@ -110,8 +110,8 @@ public MapperService(IndexSettings indexSettings, IndexAnalyzers indexAnalyzers, Function parserContextFunction = dateFormatter -> new Mapper.TypeParser.ParserContext(similarityService::getSimilarity, mapperRegistry.getMapperParsers()::get, mapperRegistry.getRuntimeFieldTypeParsers()::get, indexVersionCreated, searchExecutionContextSupplier, dateFormatter, - scriptService, indexAnalyzers, indexSettings, idFieldDataEnabled, mapperRegistry.getDynamicRuntimeFieldsBuilder() != null); - this.documentParser = new DocumentParser(xContentRegistry, parserContextFunction, mapperRegistry.getDynamicRuntimeFieldsBuilder()); + scriptService, indexAnalyzers, indexSettings, idFieldDataEnabled); + this.documentParser = new DocumentParser(xContentRegistry, parserContextFunction); Map metadataMapperParsers = mapperRegistry.getMetadataMapperParsers(indexSettings.getIndexVersionCreated()); this.parserContextSupplier = () -> parserContextFunction.apply(null); diff --git a/server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java b/server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java index 18f3e0d53ab20..0b802eaba9486 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/ObjectMapper.java @@ -219,10 +219,6 @@ protected static boolean parseObjectOrDocumentTypeProperties(String fieldName, O if (value.equalsIgnoreCase("strict")) { builder.dynamic(Dynamic.STRICT); } else if (value.equalsIgnoreCase("runtime")) { - if (parserContext.supportsDynamicRuntimeMappings() == false) { - throw new IllegalArgumentException("unable to set dynamic:runtime as there is " + - "no registered dynamic runtime fields builder"); - } builder.dynamic(Dynamic.RUNTIME); } else { boolean dynamic = XContentMapValues.nodeBooleanValue(fieldNode, fieldName + ".dynamic"); diff --git a/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java b/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java index 4f6f28b2ac212..5628c2a4816d0 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/ParseContext.java @@ -15,7 +15,6 @@ import org.elasticsearch.common.xcontent.XContentParser; import org.elasticsearch.index.IndexSettings; import org.elasticsearch.index.analysis.IndexAnalyzers; -import org.elasticsearch.plugins.MapperPlugin; import java.util.ArrayList; import java.util.Collection; @@ -685,7 +684,6 @@ public final T parseExternalValue(Class clazz) { /** * Retrieve the builder for dynamically created runtime fields - * @see MapperPlugin#getDynamicRuntimeFieldsBuilder() */ public abstract DynamicRuntimeFieldsBuilder getDynamicRuntimeFieldsBuilder(); } diff --git a/server/src/main/java/org/elasticsearch/indices/IndicesModule.java b/server/src/main/java/org/elasticsearch/indices/IndicesModule.java index bc154106c2b04..afd09f64fc545 100644 --- a/server/src/main/java/org/elasticsearch/indices/IndicesModule.java +++ b/server/src/main/java/org/elasticsearch/indices/IndicesModule.java @@ -23,7 +23,6 @@ import org.elasticsearch.index.mapper.CompletionFieldMapper; import org.elasticsearch.index.mapper.DateFieldMapper; import org.elasticsearch.index.mapper.DocCountFieldMapper; -import org.elasticsearch.index.mapper.DynamicRuntimeFieldsBuilder; import org.elasticsearch.index.mapper.FieldAliasMapper; import org.elasticsearch.index.mapper.FieldNamesFieldMapper; import org.elasticsearch.index.mapper.GeoPointFieldMapper; @@ -70,7 +69,7 @@ public class IndicesModule extends AbstractModule { public IndicesModule(List mapperPlugins) { this.mapperRegistry = new MapperRegistry(getMappers(mapperPlugins), getRuntimeFieldTypes(mapperPlugins), - getDynamicRuntimeFieldsBuilder(mapperPlugins), getMetadataMappers(mapperPlugins), getFieldFilter(mapperPlugins)); + getMetadataMappers(mapperPlugins), getFieldFilter(mapperPlugins)); } public static List getNamedWriteables() { @@ -142,19 +141,6 @@ private static Map getRuntimeFieldTypes(List mapperPlugins) { - DynamicRuntimeFieldsBuilder dynamicRuntimeFieldsBuilder = null; - for (MapperPlugin mapperPlugin : mapperPlugins) { - if (mapperPlugin.getDynamicRuntimeFieldsBuilder() != null) { - if (dynamicRuntimeFieldsBuilder != null) { - throw new IllegalArgumentException("Dynamic runtime fields builder already registered"); - } - dynamicRuntimeFieldsBuilder = mapperPlugin.getDynamicRuntimeFieldsBuilder(); - } - } - return dynamicRuntimeFieldsBuilder; - } - private static final Map builtInMetadataMappers = initBuiltInMetadataMappers(); private static final Set builtInMetadataFields = Collections.unmodifiableSet(builtInMetadataMappers.keySet()); diff --git a/server/src/main/java/org/elasticsearch/indices/mapper/MapperRegistry.java b/server/src/main/java/org/elasticsearch/indices/mapper/MapperRegistry.java index 337ef655f9419..ea898c792f2fc 100644 --- a/server/src/main/java/org/elasticsearch/indices/mapper/MapperRegistry.java +++ b/server/src/main/java/org/elasticsearch/indices/mapper/MapperRegistry.java @@ -9,7 +9,6 @@ package org.elasticsearch.indices.mapper; import org.elasticsearch.Version; -import org.elasticsearch.index.mapper.DynamicRuntimeFieldsBuilder; import org.elasticsearch.index.mapper.Mapper; import org.elasticsearch.index.mapper.MetadataFieldMapper; import org.elasticsearch.index.mapper.NestedPathFieldMapper; @@ -29,19 +28,16 @@ public final class MapperRegistry { private final Map mapperParsers; private final Map runtimeFieldTypeParsers; - private final DynamicRuntimeFieldsBuilder dynamicRuntimeFieldsBuilder; private final Map metadataMapperParsers; private final Map metadataMapperParsers7x; private final Function> fieldFilter; public MapperRegistry(Map mapperParsers, Map runtimeFieldTypeParsers, - DynamicRuntimeFieldsBuilder dynamicRuntimeFieldsBuilder, Map metadataMapperParsers, Function> fieldFilter) { this.mapperParsers = Collections.unmodifiableMap(new LinkedHashMap<>(mapperParsers)); this.runtimeFieldTypeParsers = runtimeFieldTypeParsers; - this.dynamicRuntimeFieldsBuilder = dynamicRuntimeFieldsBuilder; this.metadataMapperParsers = Collections.unmodifiableMap(new LinkedHashMap<>(metadataMapperParsers)); Map metadata7x = new LinkedHashMap<>(metadataMapperParsers); metadata7x.remove(NestedPathFieldMapper.NAME); @@ -61,10 +57,6 @@ public Map getRuntimeFieldTypeParsers() { return runtimeFieldTypeParsers; } - public DynamicRuntimeFieldsBuilder getDynamicRuntimeFieldsBuilder() { - return dynamicRuntimeFieldsBuilder; - } - /** * Return a map of the meta mappers that have been registered. The * returned map uses the name of the field as a key. diff --git a/server/src/main/java/org/elasticsearch/plugins/MapperPlugin.java b/server/src/main/java/org/elasticsearch/plugins/MapperPlugin.java index 6308a92bec149..e4cf5c3456731 100644 --- a/server/src/main/java/org/elasticsearch/plugins/MapperPlugin.java +++ b/server/src/main/java/org/elasticsearch/plugins/MapperPlugin.java @@ -8,7 +8,6 @@ package org.elasticsearch.plugins; -import org.elasticsearch.index.mapper.DynamicRuntimeFieldsBuilder; import org.elasticsearch.index.mapper.Mapper; import org.elasticsearch.index.mapper.MetadataFieldMapper; import org.elasticsearch.index.mapper.RuntimeFieldType; @@ -45,14 +44,6 @@ default Map getRuntimeFieldTypes() { return Collections.emptyMap(); } - /** - * Defines how runtime fields are dynamically created when objects are mapped with dynamic:runtime. - * @see DynamicRuntimeFieldsBuilder - */ - default DynamicRuntimeFieldsBuilder getDynamicRuntimeFieldsBuilder() { - return null; - } - /** * Returns additional metadata mapper implementations added by this plugin. *

diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/IndexMetadataVerifierTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/IndexMetadataVerifierTests.java index 8248c1379cd88..4c64a3879ef99 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/IndexMetadataVerifierTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/IndexMetadataVerifierTests.java @@ -83,7 +83,7 @@ private IndexMetadataVerifier getIndexMetadataVerifier() { return new IndexMetadataVerifier( Settings.EMPTY, xContentRegistry(), - new MapperRegistry(Collections.emptyMap(), Collections.emptyMap(), null, Collections.emptyMap(), + new MapperRegistry(Collections.emptyMap(), Collections.emptyMap(), Collections.emptyMap(), MapperPlugin.NOOP_FIELD_FILTER), IndexScopedSettings.DEFAULT_SCOPED_SETTINGS, null ); diff --git a/server/src/test/java/org/elasticsearch/index/codec/CodecTests.java b/server/src/test/java/org/elasticsearch/index/codec/CodecTests.java index 004f9531de006..5939e6fbf72d2 100644 --- a/server/src/test/java/org/elasticsearch/index/codec/CodecTests.java +++ b/server/src/test/java/org/elasticsearch/index/codec/CodecTests.java @@ -105,7 +105,7 @@ private CodecService createCodecService() throws IOException { IndexSettings settings = IndexSettingsModule.newIndexSettings("_na", nodeSettings); SimilarityService similarityService = new SimilarityService(settings, null, Collections.emptyMap()); IndexAnalyzers indexAnalyzers = createTestAnalysis(settings, nodeSettings).indexAnalyzers; - MapperRegistry mapperRegistry = new MapperRegistry(Collections.emptyMap(), Collections.emptyMap(), null, Collections.emptyMap(), + MapperRegistry mapperRegistry = new MapperRegistry(Collections.emptyMap(), Collections.emptyMap(), Collections.emptyMap(), MapperPlugin.NOOP_FIELD_FILTER); MapperService service = new MapperService(settings, indexAnalyzers, xContentRegistry(), similarityService, mapperRegistry, () -> null, () -> false, null); diff --git a/server/src/test/java/org/elasticsearch/index/mapper/MappingParserTests.java b/server/src/test/java/org/elasticsearch/index/mapper/MappingParserTests.java index d4711b783f2ef..885ea2c15287a 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/MappingParserTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/MappingParserTests.java @@ -39,7 +39,7 @@ private static MappingParser createMappingParser(Settings settings) { () -> new Mapper.TypeParser.ParserContext(similarityService::getSimilarity, mapperRegistry.getMapperParsers()::get, mapperRegistry.getRuntimeFieldTypeParsers()::get, indexSettings.getIndexVersionCreated(), () -> { throw new UnsupportedOperationException(); }, null, - scriptService, indexAnalyzers, indexSettings, () -> false, mapperRegistry.getDynamicRuntimeFieldsBuilder() != null); + scriptService, indexAnalyzers, indexSettings, () -> false); Map metadataMapperParsers = mapperRegistry.getMetadataMapperParsers(indexSettings.getIndexVersionCreated()); Map, MetadataFieldMapper> metadataMappers = new LinkedHashMap<>(); diff --git a/server/src/test/java/org/elasticsearch/index/mapper/ParametrizedMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/ParametrizedMapperTests.java index 7918134e328c8..57fea94a8821a 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/ParametrizedMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/ParametrizedMapperTests.java @@ -205,7 +205,7 @@ private static TestMapper fromMapping(String mapping, Version version, boolean f }, name -> null, version, () -> null, null, null, mapperService.getIndexAnalyzers(), mapperService.getIndexSettings(), () -> { throw new UnsupportedOperationException(); - }, false); + }); if (fromDynamicTemplate) { pc = pc.createDynamicTemplateFieldContext(pc); } diff --git a/server/src/test/java/org/elasticsearch/index/mapper/TestRuntimeField.java b/server/src/test/java/org/elasticsearch/index/mapper/TestRuntimeField.java index f1875212bd055..e2d775ec78dfb 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/TestRuntimeField.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/TestRuntimeField.java @@ -9,7 +9,6 @@ package org.elasticsearch.index.mapper; import org.apache.lucene.search.Query; -import org.elasticsearch.common.time.DateFormatter; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.MapperPlugin; @@ -56,35 +55,5 @@ public Map getRuntimeFieldTypes() { "boolean", (name, node, parserContext) -> new TestRuntimeField(name, "boolean"), "date", (name, node, parserContext) -> new TestRuntimeField(name, "date")); } - - @Override - public DynamicRuntimeFieldsBuilder getDynamicRuntimeFieldsBuilder() { - return new DynamicRuntimeFieldsBuilder() { - @Override - public RuntimeFieldType newDynamicStringField(String name) { - return new TestRuntimeField(name, "keyword"); - } - - @Override - public RuntimeFieldType newDynamicLongField(String name) { - return new TestRuntimeField(name, "long"); - } - - @Override - public RuntimeFieldType newDynamicDoubleField(String name) { - return new TestRuntimeField(name, "double"); - } - - @Override - public RuntimeFieldType newDynamicBooleanField(String name) { - return new TestRuntimeField(name, "boolean"); - } - - @Override - public RuntimeFieldType newDynamicDateField(String name, DateFormatter dateFormatter) { - return new TestRuntimeField(name, "date"); - } - }; - } } } diff --git a/server/src/test/java/org/elasticsearch/index/mapper/TypeParsersTests.java b/server/src/test/java/org/elasticsearch/index/mapper/TypeParsersTests.java index 2feb12958e11d..3b0dd8630259d 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/TypeParsersTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/TypeParsersTests.java @@ -73,7 +73,7 @@ public void testMultiFieldWithinMultiField() throws IOException { Mapper.TypeParser.ParserContext olderContext = new Mapper.TypeParser.ParserContext(null, type -> typeParser, type -> null, olderVersion, null, null, null, mapperService.getIndexAnalyzers(), mapperService.getIndexSettings(), () -> { throw new UnsupportedOperationException(); - }, false); + }); TextFieldMapper.PARSER.parse("some-field", fieldNode, olderContext); assertWarnings("At least one multi-field, [sub-field], " + @@ -90,7 +90,7 @@ public void testMultiFieldWithinMultiField() throws IOException { Mapper.TypeParser.ParserContext context = new Mapper.TypeParser.ParserContext(null, type -> typeParser, type -> null, version, null, null, null, mapperService.getIndexAnalyzers(), mapperService.getIndexSettings(), () -> { throw new UnsupportedOperationException(); - }, false); + }); IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> { TextFieldMapper.PARSER.parse("textField", fieldNodeCopy, context); diff --git a/server/src/test/java/org/elasticsearch/index/query/SearchExecutionContextTests.java b/server/src/test/java/org/elasticsearch/index/query/SearchExecutionContextTests.java index c581f4a8b595c..5912b58d0f916 100644 --- a/server/src/test/java/org/elasticsearch/index/query/SearchExecutionContextTests.java +++ b/server/src/test/java/org/elasticsearch/index/query/SearchExecutionContextTests.java @@ -459,8 +459,7 @@ private static MapperService createMapperService( null, indexAnalyzers, indexSettings, - () -> true, - false + () -> true )); return mapperService; } diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java b/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java index ba87f305b7812..ccf8055cd387f 100644 --- a/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java +++ b/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java @@ -9,9 +9,7 @@ package org.elasticsearch.indices; import org.elasticsearch.Version; -import org.elasticsearch.common.time.DateFormatter; import org.elasticsearch.index.mapper.DocCountFieldMapper; -import org.elasticsearch.index.mapper.DynamicRuntimeFieldsBuilder; import org.elasticsearch.index.mapper.FieldNamesFieldMapper; import org.elasticsearch.index.mapper.IdFieldMapper; import org.elasticsearch.index.mapper.IgnoredFieldMapper; @@ -21,7 +19,6 @@ import org.elasticsearch.index.mapper.MetadataFieldMapper; import org.elasticsearch.index.mapper.NestedPathFieldMapper; import org.elasticsearch.index.mapper.RoutingFieldMapper; -import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.mapper.SeqNoFieldMapper; import org.elasticsearch.index.mapper.SourceFieldMapper; import org.elasticsearch.index.mapper.TestRuntimeField; @@ -179,45 +176,6 @@ public void testDuplicateRuntimeFieldPlugin() { assertThat(e.getMessage(), containsString("already registered")); } - public void testTwoDynamicRuntimeFieldsBuilders() { - TestRuntimeField.Plugin plugin = new TestRuntimeField.Plugin(); - MapperPlugin second = new MapperPlugin() { - @Override - public DynamicRuntimeFieldsBuilder getDynamicRuntimeFieldsBuilder() { - return new DynamicRuntimeFieldsBuilder() { - @Override - public RuntimeFieldType newDynamicStringField(String name) { - return null; - } - - @Override - public RuntimeFieldType newDynamicLongField(String name) { - return null; - } - - @Override - public RuntimeFieldType newDynamicDoubleField(String name) { - return null; - } - - @Override - public RuntimeFieldType newDynamicBooleanField(String name) { - return null; - } - - @Override - public RuntimeFieldType newDynamicDateField(String name, DateFormatter dateFormatter) { - return null; - } - }; - } - }; - List plugins = Arrays.asList(plugin, second); - IllegalArgumentException e = expectThrows(IllegalArgumentException.class, - () -> new IndicesModule(plugins)); - assertThat(e.getMessage(), containsString("already registered")); - } - public void testDuplicateFieldNamesMapper() { List plugins = Arrays.asList(new MapperPlugin() { @Override diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java index 6ece6c57bcafd..4002a31989b61 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java @@ -349,7 +349,8 @@ protected Object buildScriptFactory(ScriptContext context) { @Override public Set> getSupportedContexts() { - return Set.copyOf(new RuntimeFields(Settings.EMPTY).getContexts()); + //TODO return Set.copyOf(new RuntimeFields(Settings.EMPTY).getContexts()); + return Collections.emptySet(); } }; } diff --git a/test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java b/test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java index def1e6b906df0..de4fe8d5737cd 100644 --- a/test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/search/aggregations/AggregatorTestCase.java @@ -83,8 +83,8 @@ import org.elasticsearch.index.mapper.RangeType; import org.elasticsearch.index.mapper.TextFieldMapper; import org.elasticsearch.index.query.QueryRewriteContext; -import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.index.query.Rewriteable; +import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.IndicesModule; @@ -874,7 +874,7 @@ private void writeTestDoc(MappedFieldType fieldType, String fieldName, RandomInd private static class MockParserContext extends Mapper.TypeParser.ParserContext { MockParserContext() { - super(null, null, null, null, null, null, null, null, null, null, false); + super(null, null, null, null, null, null, null, null, null, null); } @Override diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java index 50805fb226dca..18b295dd0666b 100644 --- a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java +++ b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java @@ -21,7 +21,6 @@ import org.elasticsearch.env.NodeEnvironment; import org.elasticsearch.index.mapper.BooleanFieldMapper; import org.elasticsearch.index.mapper.DateFieldMapper; -import org.elasticsearch.index.mapper.DynamicRuntimeFieldsBuilder; import org.elasticsearch.index.mapper.GeoPointFieldMapper; import org.elasticsearch.index.mapper.IpFieldMapper; import org.elasticsearch.index.mapper.KeywordFieldMapper; @@ -113,11 +112,6 @@ public List> getContexts() { ); } - @Override - public DynamicRuntimeFieldsBuilder getDynamicRuntimeFieldsBuilder() { - return org.elasticsearch.xpack.runtimefields.mapper.DynamicRuntimeFieldsBuilder.INSTANCE; - } - @Override public List> getActions() { return List.of( From 7488339f4bd9bb75aca23c0d37cae707024d6a8f Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 13:54:54 +0100 Subject: [PATCH 06/16] make runtime fields types built-in --- .../elasticsearch/indices/IndicesModule.java | 15 ++++++++++ .../xpack/runtimefields/RuntimeFields.java | 28 ------------------- 2 files changed, 15 insertions(+), 28 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/indices/IndicesModule.java b/server/src/main/java/org/elasticsearch/indices/IndicesModule.java index afd09f64fc545..546f3eed6e07d 100644 --- a/server/src/main/java/org/elasticsearch/indices/IndicesModule.java +++ b/server/src/main/java/org/elasticsearch/indices/IndicesModule.java @@ -51,6 +51,13 @@ import org.elasticsearch.indices.mapper.MapperRegistry; import org.elasticsearch.indices.store.IndicesStore; import org.elasticsearch.plugins.MapperPlugin; +import org.elasticsearch.xpack.runtimefields.mapper.BooleanScriptFieldType; +import org.elasticsearch.xpack.runtimefields.mapper.DateScriptFieldType; +import org.elasticsearch.xpack.runtimefields.mapper.DoubleScriptFieldType; +import org.elasticsearch.xpack.runtimefields.mapper.GeoPointScriptFieldType; +import org.elasticsearch.xpack.runtimefields.mapper.IpScriptFieldType; +import org.elasticsearch.xpack.runtimefields.mapper.KeywordScriptFieldType; +import org.elasticsearch.xpack.runtimefields.mapper.LongScriptFieldType; import java.util.Arrays; import java.util.Collections; @@ -131,6 +138,14 @@ public static Map getMappers(List mappe private static Map getRuntimeFieldTypes(List mapperPlugins) { Map runtimeParsers = new LinkedHashMap<>(); + runtimeParsers.put(BooleanFieldMapper.CONTENT_TYPE, BooleanScriptFieldType.PARSER); + runtimeParsers.put(NumberFieldMapper.NumberType.LONG.typeName(), LongScriptFieldType.PARSER); + runtimeParsers.put(NumberFieldMapper.NumberType.DOUBLE.typeName(), DoubleScriptFieldType.PARSER); + runtimeParsers.put(IpFieldMapper.CONTENT_TYPE, IpScriptFieldType.PARSER); + runtimeParsers.put(DateFieldMapper.CONTENT_TYPE, DateScriptFieldType.PARSER); + runtimeParsers.put(KeywordFieldMapper.CONTENT_TYPE, KeywordScriptFieldType.PARSER); + runtimeParsers.put(GeoPointFieldMapper.CONTENT_TYPE, GeoPointScriptFieldType.PARSER); + for (MapperPlugin mapperPlugin : mapperPlugins) { for (Map.Entry entry : mapperPlugin.getRuntimeFieldTypes().entrySet()) { if (runtimeParsers.put(entry.getKey(), entry.getValue()) != null) { diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java index 18b295dd0666b..96efef3bfc7d1 100644 --- a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java +++ b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java @@ -19,13 +19,6 @@ import org.elasticsearch.common.xcontent.NamedXContentRegistry; import org.elasticsearch.env.Environment; import org.elasticsearch.env.NodeEnvironment; -import org.elasticsearch.index.mapper.BooleanFieldMapper; -import org.elasticsearch.index.mapper.DateFieldMapper; -import org.elasticsearch.index.mapper.GeoPointFieldMapper; -import org.elasticsearch.index.mapper.IpFieldMapper; -import org.elasticsearch.index.mapper.KeywordFieldMapper; -import org.elasticsearch.index.mapper.NumberFieldMapper; -import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.plugins.ActionPlugin; import org.elasticsearch.plugins.MapperPlugin; import org.elasticsearch.plugins.Plugin; @@ -38,25 +31,17 @@ import org.elasticsearch.xpack.core.action.XPackInfoFeatureAction; import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction; import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanScriptFieldType; import org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DateScriptFieldType; import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleScriptFieldType; import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointScriptFieldType; import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.IpScriptFieldType; -import org.elasticsearch.xpack.runtimefields.mapper.KeywordScriptFieldType; import org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.LongScriptFieldType; import org.elasticsearch.xpack.runtimefields.mapper.NamedGroupExtractor; import org.elasticsearch.xpack.runtimefields.mapper.NamedGroupExtractor.GrokHelper; import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.Collection; import java.util.List; -import java.util.Map; import java.util.function.Supplier; public final class RuntimeFields extends Plugin implements MapperPlugin, ScriptPlugin, ActionPlugin { @@ -86,19 +71,6 @@ public List> getSettings() { return List.of(GROK_WATCHDOG_INTERVAL, GROK_WATCHDOG_MAX_EXECUTION_TIME); } - @Override - public Map getRuntimeFieldTypes() { - return Map.ofEntries( - Map.entry(BooleanFieldMapper.CONTENT_TYPE, BooleanScriptFieldType.PARSER), - Map.entry(NumberFieldMapper.NumberType.LONG.typeName(), LongScriptFieldType.PARSER), - Map.entry(NumberFieldMapper.NumberType.DOUBLE.typeName(), DoubleScriptFieldType.PARSER), - Map.entry(IpFieldMapper.CONTENT_TYPE, IpScriptFieldType.PARSER), - Map.entry(DateFieldMapper.CONTENT_TYPE, DateScriptFieldType.PARSER), - Map.entry(KeywordFieldMapper.CONTENT_TYPE, KeywordScriptFieldType.PARSER), - Map.entry(GeoPointFieldMapper.CONTENT_TYPE, GeoPointScriptFieldType.PARSER) - ); - } - @Override public List> getContexts() { return List.of( From 42a8f7954992e2afe3f9b524b0c8fbdf5043cba0 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 14:53:51 +0100 Subject: [PATCH 07/16] move runtime fields contexts into core contexts --- .../elasticsearch/script/ScriptModule.java | 16 +++++++++++- .../AbstractScriptFieldTypeTestCase.java | 1 - .../mapper/BooleanScriptFieldTypeTests.java | 4 +-- .../mapper/DateScriptFieldTypeTests.java | 2 +- .../mapper/DoubleScriptFieldTypeTests.java | 2 +- .../mapper/GeoPointScriptFieldTypeTests.java | 2 +- .../mapper/KeywordScriptFieldTypeTests.java | 2 +- .../mapper/LongScriptFieldTypeTests.java | 2 +- .../xpack/runtimefields/RuntimeFields.java | 25 +------------------ 9 files changed, 23 insertions(+), 33 deletions(-) diff --git a/server/src/main/java/org/elasticsearch/script/ScriptModule.java b/server/src/main/java/org/elasticsearch/script/ScriptModule.java index f47246e278f3d..beecf78b7dbda 100644 --- a/server/src/main/java/org/elasticsearch/script/ScriptModule.java +++ b/server/src/main/java/org/elasticsearch/script/ScriptModule.java @@ -13,6 +13,13 @@ import org.elasticsearch.index.query.IntervalFilterScript; import org.elasticsearch.plugins.ScriptPlugin; import org.elasticsearch.search.aggregations.pipeline.MovingFunctionScript; +import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.Collections; import java.util.HashMap; @@ -51,7 +58,14 @@ public class ScriptModule { ScriptedMetricAggContexts.MapScript.CONTEXT, ScriptedMetricAggContexts.CombineScript.CONTEXT, ScriptedMetricAggContexts.ReduceScript.CONTEXT, - IntervalFilterScript.CONTEXT + IntervalFilterScript.CONTEXT, + BooleanFieldScript.CONTEXT, + DateFieldScript.CONTEXT, + DoubleFieldScript.CONTEXT, + GeoPointFieldScript.CONTEXT, + IpFieldScript.CONTEXT, + LongFieldScript.CONTEXT, + StringFieldScript.CONTEXT ).collect(Collectors.toMap(c -> c.name, Function.identity())); } diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java index 4002a31989b61..2c8eb0139e695 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java @@ -349,7 +349,6 @@ protected Object buildScriptFactory(ScriptContext context) { @Override public Set> getSupportedContexts() { - //TODO return Set.copyOf(new RuntimeFields(Settings.EMPTY).getContexts()); return Collections.emptySet(); } }; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java index 4ebf2ba9853b3..76d9e9e23b9b3 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java @@ -417,7 +417,7 @@ public String getType() { @Override public Set> getSupportedContexts() { - return Set.of(DoubleFieldScript.CONTEXT); + return Set.of(); } @Override @@ -456,7 +456,7 @@ public void execute() { return (fieldName, params, lookup) -> { // Indicate that this script wants the field call "test", which *is* the name of this field lookup.forkAndTrackFieldReferences("test"); - throw new IllegalStateException("shoud have thrown on the line above"); + throw new IllegalStateException("should have thrown on the line above"); }; default: throw new IllegalArgumentException("unsupported script [" + code + "]"); diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java index a5a673e951e27..c3b86f7626cd6 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java @@ -485,7 +485,7 @@ public String getType() { @Override public Set> getSupportedContexts() { - return Set.of(DateFieldScript.CONTEXT); + return Set.of(); } @Override diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java index a7e1cfc4a3a9c..12230145525be 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java @@ -259,7 +259,7 @@ public String getType() { @Override public Set> getSupportedContexts() { - return Set.of(DoubleFieldScript.CONTEXT); + return Set.of(); } @Override diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java index ad9f8ab6b3c55..6d55f61cbd612 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java @@ -229,7 +229,7 @@ public String getType() { @Override public Set> getSupportedContexts() { - return Set.of(StringFieldScript.CONTEXT, GeoPointFieldScript.CONTEXT); + return Set.of(); } @Override diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java index 8321258311c60..461c2672e72a7 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java @@ -391,7 +391,7 @@ public String getType() { @Override public Set> getSupportedContexts() { - return Set.of(StringFieldScript.CONTEXT); + return Set.of(); } @Override diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java index 053c5cefb0b1e..a82794c403dff 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java @@ -293,7 +293,7 @@ public String getType() { @Override public Set> getSupportedContexts() { - return Set.of(LongFieldScript.CONTEXT); + return Set.of(); } @Override diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java index 96efef3bfc7d1..bf17a435555c9 100644 --- a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java +++ b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/RuntimeFields.java @@ -20,31 +20,21 @@ import org.elasticsearch.env.Environment; import org.elasticsearch.env.NodeEnvironment; import org.elasticsearch.plugins.ActionPlugin; -import org.elasticsearch.plugins.MapperPlugin; import org.elasticsearch.plugins.Plugin; -import org.elasticsearch.plugins.ScriptPlugin; import org.elasticsearch.repositories.RepositoriesService; -import org.elasticsearch.script.ScriptContext; import org.elasticsearch.script.ScriptService; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; import org.elasticsearch.xpack.core.action.XPackInfoFeatureAction; import org.elasticsearch.xpack.core.action.XPackUsageFeatureAction; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript; import org.elasticsearch.xpack.runtimefields.mapper.NamedGroupExtractor; import org.elasticsearch.xpack.runtimefields.mapper.NamedGroupExtractor.GrokHelper; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.Collection; import java.util.List; import java.util.function.Supplier; -public final class RuntimeFields extends Plugin implements MapperPlugin, ScriptPlugin, ActionPlugin { +public final class RuntimeFields extends Plugin implements ActionPlugin { static final Setting GROK_WATCHDOG_INTERVAL = Setting.timeSetting( "runtime_fields.grok.watchdog.interval", @@ -71,19 +61,6 @@ public List> getSettings() { return List.of(GROK_WATCHDOG_INTERVAL, GROK_WATCHDOG_MAX_EXECUTION_TIME); } - @Override - public List> getContexts() { - return List.of( - BooleanFieldScript.CONTEXT, - DateFieldScript.CONTEXT, - DoubleFieldScript.CONTEXT, - GeoPointFieldScript.CONTEXT, - IpFieldScript.CONTEXT, - LongFieldScript.CONTEXT, - StringFieldScript.CONTEXT - ); - } - @Override public List> getActions() { return List.of( From dd6c5448c13bd07dbbdb2029b322f903366a9193 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 21:23:46 +0100 Subject: [PATCH 08/16] move whitelists to painless lang plugin Except the whitelists around grok and dissect which stay for now separate as they depend on grok and dissect --- .../painless/PainlessPlugin.java | 24 +++++++++++++++++++ ...rg.elasticsearch.runtimefields.boolean.txt | 5 ++-- .../org.elasticsearch.runtimefields.date.txt | 5 ++-- ...org.elasticsearch.runtimefields.double.txt | 5 ++-- ...g.elasticsearch.runtimefields.geopoint.txt | 5 ++-- .../org.elasticsearch.runtimefields.ip.txt | 5 ++-- .../org.elasticsearch.runtimefields.long.txt | 5 ++-- ...org.elasticsearch.runtimefields.string.txt | 5 ++-- .../RuntimeFieldsPainlessExtension.java | 5 ++-- 9 files changed, 48 insertions(+), 16 deletions(-) rename x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/boolean_whitelist.txt => modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt (79%) rename x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/date_whitelist.txt => modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt (82%) rename x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/double_whitelist.txt => modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt (78%) rename x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/geo_point_whitelist.txt => modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt (79%) rename x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/ip_whitelist.txt => modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt (78%) rename x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/long_whitelist.txt => modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt (78%) rename x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/string_whitelist.txt => modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt (78%) diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java index 21207070c661c..79cd43deb2c7e 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java @@ -45,6 +45,13 @@ import org.elasticsearch.search.aggregations.pipeline.MovingFunctionScript; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; +import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript; +import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.ArrayList; import java.util.Arrays; @@ -88,6 +95,15 @@ public final class PainlessPlugin extends Plugin implements ScriptPlugin, Extens ingest.add(ingestWhitelist); map.put(IngestScript.CONTEXT, ingest); + // Functions available to runtime fields + map.put(BooleanFieldScript.CONTEXT, getRuntimeFieldWhitelist("boolean")); + map.put(DateFieldScript.CONTEXT, getRuntimeFieldWhitelist("date")); + map.put(DoubleFieldScript.CONTEXT, getRuntimeFieldWhitelist("double")); + map.put(LongFieldScript.CONTEXT, getRuntimeFieldWhitelist("long")); + map.put(StringFieldScript.CONTEXT, getRuntimeFieldWhitelist("string")); + map.put(GeoPointFieldScript.CONTEXT, getRuntimeFieldWhitelist("geopoint")); + map.put(IpFieldScript.CONTEXT, getRuntimeFieldWhitelist("ip")); + // Execute context gets everything List test = new ArrayList<>(Whitelist.BASE_WHITELISTS); test.add(movFnWhitelist); @@ -99,6 +115,14 @@ public final class PainlessPlugin extends Plugin implements ScriptPlugin, Extens whitelists = map; } + private static List getRuntimeFieldWhitelist(String fieldType) { + List scriptField = new ArrayList<>(Whitelist.BASE_WHITELISTS); + Whitelist whitelist = WhitelistLoader.loadFromResourceFiles(Whitelist.class, + "org.elasticsearch.runtimefields." + fieldType + ".txt"); + scriptField.add(whitelist); + return scriptField; + } + private final SetOnce painlessScriptEngine = new SetOnce<>(); @Override diff --git a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/boolean_whitelist.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt similarity index 79% rename from x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/boolean_whitelist.txt rename to modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt index adc5079bf0b96..4330474f9739f 100644 --- a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/boolean_whitelist.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt @@ -1,8 +1,9 @@ # # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License -# 2.0; you may not use this file except in compliance with the Elastic License -# 2.0. +# 2.0 and the Server Side Public License, v 1; you may not use this file except +# in compliance with, at your election, the Elastic License 2.0 or the Server +# Side Public License, v 1. # # The whitelist for boolean-valued runtime fields diff --git a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/date_whitelist.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt similarity index 82% rename from x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/date_whitelist.txt rename to modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt index 172840755b927..b2b104d14ccf9 100644 --- a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/date_whitelist.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt @@ -1,8 +1,9 @@ # # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License -# 2.0; you may not use this file except in compliance with the Elastic License -# 2.0. +# 2.0 and the Server Side Public License, v 1; you may not use this file except +# in compliance with, at your election, the Elastic License 2.0 or the Server +# Side Public License, v 1. # # The whitelist for date-valued runtime fields diff --git a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/double_whitelist.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt similarity index 78% rename from x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/double_whitelist.txt rename to modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt index aafb7d37c95ad..d023f3eadb8a5 100644 --- a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/double_whitelist.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt @@ -1,8 +1,9 @@ # # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License -# 2.0; you may not use this file except in compliance with the Elastic License -# 2.0. +# 2.0 and the Server Side Public License, v 1; you may not use this file except +# in compliance with, at your election, the Elastic License 2.0 or the Server +# Side Public License, v 1. # # The whitelist for double-valued runtime fields diff --git a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/geo_point_whitelist.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt similarity index 79% rename from x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/geo_point_whitelist.txt rename to modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt index 312ba4bd76638..e9960ec5637ec 100644 --- a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/geo_point_whitelist.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt @@ -1,8 +1,9 @@ # # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License -# 2.0; you may not use this file except in compliance with the Elastic License -# 2.0. +# 2.0 and the Server Side Public License, v 1; you may not use this file except +# in compliance with, at your election, the Elastic License 2.0 or the Server +# Side Public License, v 1. # # The whitelist for ip-valued runtime fields diff --git a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/ip_whitelist.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt similarity index 78% rename from x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/ip_whitelist.txt rename to modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt index ec8578c36a23d..e56e76cb1e416 100644 --- a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/ip_whitelist.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt @@ -1,8 +1,9 @@ # # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License -# 2.0; you may not use this file except in compliance with the Elastic License -# 2.0. +# 2.0 and the Server Side Public License, v 1; you may not use this file except +# in compliance with, at your election, the Elastic License 2.0 or the Server +# Side Public License, v 1. # # The whitelist for ip-valued runtime fields diff --git a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/long_whitelist.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt similarity index 78% rename from x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/long_whitelist.txt rename to modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt index 54706ec69f535..1469a293dbdd3 100644 --- a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/long_whitelist.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt @@ -1,8 +1,9 @@ # # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License -# 2.0; you may not use this file except in compliance with the Elastic License -# 2.0. +# 2.0 and the Server Side Public License, v 1; you may not use this file except +# in compliance with, at your election, the Elastic License 2.0 or the Server +# Side Public License, v 1. # # The whitelist for long-valued runtime fields diff --git a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/string_whitelist.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt similarity index 78% rename from x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/string_whitelist.txt rename to modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt index e47f97b981caa..e603e793f050f 100644 --- a/x-pack/plugin/runtime-fields/src/main/resources/org/elasticsearch/xpack/runtimefields/mapper/string_whitelist.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt @@ -1,8 +1,9 @@ # # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License -# 2.0; you may not use this file except in compliance with the Elastic License -# 2.0. +# 2.0 and the Server Side Public License, v 1; you may not use this file except +# in compliance with, at your election, the Elastic License 2.0 or the Server +# Side Public License, v 1. # # The whitelist for string-valued runtime fields diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java index 88a95c82d05cd..009a848bd7b78 100644 --- a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java +++ b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java @@ -19,7 +19,8 @@ import java.util.Map; public class RuntimeFieldsPainlessExtension implements PainlessExtension { - private final Whitelist commonWhitelist = WhitelistLoader.loadFromResourceFiles(AbstractFieldScript.class, "common_whitelist.txt"); + private final Whitelist commonWhitelist = WhitelistLoader.loadFromResourceFiles( + RuntimeFieldsPainlessExtension.class, "common_whitelist.txt"); private final Whitelist grokWhitelist; @@ -43,7 +44,7 @@ public RuntimeFieldsPainlessExtension(RuntimeFields plugin) { } private List load(String path) { - return List.of(commonWhitelist, grokWhitelist, WhitelistLoader.loadFromResourceFiles(AbstractFieldScript.class, path)); + return List.of(commonWhitelist, grokWhitelist); } @Override From e8e00675e38ee1d57decc34cd82ed1c3314fb209 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 21:39:50 +0100 Subject: [PATCH 09/16] rename packages --- .../painless/PainlessPlugin.java | 14 ++++---- ...rg.elasticsearch.runtimefields.boolean.txt | 6 ++-- .../org.elasticsearch.runtimefields.date.txt | 8 ++--- ...org.elasticsearch.runtimefields.double.txt | 6 ++-- ...g.elasticsearch.runtimefields.geopoint.txt | 6 ++-- .../org.elasticsearch.runtimefields.ip.txt | 6 ++-- .../org.elasticsearch.runtimefields.long.txt | 6 ++-- ...org.elasticsearch.runtimefields.string.txt | 6 ++-- .../index/mapper/DocumentParser.java | 2 +- .../elasticsearch/indices/IndicesModule.java | 14 ++++---- .../fielddata/BinaryScriptFieldData.java | 2 +- .../fielddata/BooleanScriptDocValues.java | 4 +-- .../fielddata/BooleanScriptFieldData.java | 4 +-- .../fielddata/DateScriptFieldData.java | 4 +-- .../fielddata/DoubleScriptDocValues.java | 4 +-- .../fielddata/DoubleScriptFieldData.java | 4 +-- .../fielddata/GeoPointScriptDocValues.java | 4 +-- .../fielddata/GeoPointScriptFieldData.java | 4 +-- .../fielddata/IpScriptDocValues.java | 4 +-- .../fielddata/IpScriptFieldData.java | 6 ++-- .../fielddata/LongScriptDocValues.java | 4 +-- .../fielddata/LongScriptFieldData.java | 4 +-- .../fielddata/StringScriptDocValues.java | 4 +-- .../fielddata/StringScriptFieldData.java | 4 +-- .../mapper/AbstractFieldScript.java | 2 +- .../mapper/AbstractLongFieldScript.java | 2 +- .../mapper/AbstractScriptFieldType.java | 2 +- .../mapper/BooleanFieldScript.java | 2 +- .../mapper/BooleanScriptFieldType.java | 8 ++--- .../runtimefields/mapper/DateFieldScript.java | 2 +- .../mapper/DateScriptFieldType.java | 14 ++++---- .../mapper/DoubleFieldScript.java | 2 +- .../mapper/DoubleScriptFieldType.java | 12 +++---- .../mapper/DynamicRuntimeFieldsBuilder.java | 2 +- .../mapper/GeoPointFieldScript.java | 2 +- .../mapper/GeoPointScriptFieldType.java | 10 +++--- .../runtimefields/mapper/IpFieldScript.java | 2 +- .../mapper/IpScriptFieldType.java | 12 +++---- .../mapper/KeywordScriptFieldType.java | 20 +++++------ .../runtimefields/mapper/LongFieldScript.java | 2 +- .../mapper/LongScriptFieldType.java | 12 +++---- .../mapper/StringFieldScript.java | 2 +- .../AbstractBooleanScriptFieldQuery.java | 6 ++-- .../query/AbstractDoubleScriptFieldQuery.java | 4 +-- .../AbstractGeoPointScriptFieldQuery.java | 4 +-- .../query/AbstractIpScriptFieldQuery.java | 6 ++-- .../query/AbstractLongScriptFieldQuery.java | 4 +-- .../query/AbstractScriptFieldQuery.java | 4 +-- ...stractStringScriptFieldAutomatonQuery.java | 4 +-- .../query/AbstractStringScriptFieldQuery.java | 4 +-- .../query/BooleanScriptFieldExistsQuery.java | 4 +-- .../query/BooleanScriptFieldTermQuery.java | 4 +-- .../query/DoubleScriptFieldExistsQuery.java | 4 +-- .../query/DoubleScriptFieldRangeQuery.java | 4 +-- .../query/DoubleScriptFieldTermQuery.java | 4 +-- .../query/DoubleScriptFieldTermsQuery.java | 4 +-- ...oPointScriptFieldDistanceFeatureQuery.java | 4 +-- .../query/GeoPointScriptFieldExistsQuery.java | 4 +-- .../GeoPointScriptFieldGeoShapeQuery.java | 4 +-- .../query/IpScriptFieldExistsQuery.java | 4 +-- .../query/IpScriptFieldRangeQuery.java | 4 +-- .../query/IpScriptFieldTermQuery.java | 4 +-- .../query/IpScriptFieldTermsQuery.java | 4 +-- .../LongScriptFieldDistanceFeatureQuery.java | 4 +-- .../query/LongScriptFieldExistsQuery.java | 4 +-- .../query/LongScriptFieldRangeQuery.java | 4 +-- .../query/LongScriptFieldTermQuery.java | 4 +-- .../query/LongScriptFieldTermsQuery.java | 4 +-- .../query/StringScriptFieldExistsQuery.java | 4 +-- .../query/StringScriptFieldFuzzyQuery.java | 4 +-- .../query/StringScriptFieldPrefixQuery.java | 4 +-- .../query/StringScriptFieldRangeQuery.java | 4 +-- .../query/StringScriptFieldRegexpQuery.java | 4 +-- .../query/StringScriptFieldTermQuery.java | 4 +-- .../query/StringScriptFieldTermsQuery.java | 4 +-- .../query/StringScriptFieldWildcardQuery.java | 4 +-- .../elasticsearch/script/ScriptModule.java | 14 ++++---- ...bstractNonTextScriptFieldTypeTestCase.java | 2 +- .../AbstractScriptFieldTypeTestCase.java | 2 +- .../mapper/BooleanFieldScriptTests.java | 2 +- .../mapper/BooleanScriptFieldTypeTests.java | 4 +-- .../mapper/DateFieldScriptTests.java | 2 +- .../mapper/DateScriptFieldTypeTests.java | 4 +-- .../mapper/DoubleFieldScriptTests.java | 2 +- .../mapper/DoubleScriptFieldTypeTests.java | 4 +-- .../mapper/DynamicRuntimeTests.java | 2 +- .../mapper/FieldScriptTestCase.java | 2 +- .../mapper/GeoPointFieldScriptTests.java | 2 +- .../mapper/GeoPointScriptFieldTypeTests.java | 4 +-- .../mapper/IpFieldScriptTests.java | 2 +- .../mapper/IpScriptFieldTypeTests.java | 6 ++-- .../mapper/KeywordScriptFieldTypeTests.java | 6 ++-- .../mapper/LongFieldScriptTests.java | 2 +- .../mapper/LongScriptFieldTypeTests.java | 4 +-- .../mapper/StringFieldScriptTests.java | 2 +- .../mapper/TestScriptEngine.java | 2 +- ...stractBooleanScriptFieldQueryTestCase.java | 4 +-- ...bstractDoubleScriptFieldQueryTestCase.java | 4 +-- ...tractGeoPointScriptFieldQueryTestCase.java | 4 +-- .../AbstractIpScriptFieldQueryTestCase.java | 4 +-- .../AbstractLongScriptFieldQueryTestCase.java | 4 +-- .../AbstractScriptFieldQueryTestCase.java | 2 +- .../query/AbstractScriptFieldQueryTests.java | 4 +-- ...bstractStringScriptFieldQueryTestCase.java | 4 +-- .../BooleanScriptFieldExistsQueryTests.java | 2 +- .../BooleanScriptFieldTermQueryTests.java | 2 +- .../DoubleScriptFieldExistsQueryTests.java | 2 +- .../DoubleScriptFieldRangeQueryTests.java | 2 +- .../DoubleScriptFieldTermQueryTests.java | 2 +- .../DoubleScriptFieldTermsQueryTests.java | 2 +- ...tScriptFieldDistanceFeatureQueryTests.java | 6 ++-- .../GeoPointScriptFieldExistsQueryTests.java | 2 +- ...GeoPointScriptFieldGeoShapeQueryTests.java | 2 +- .../query/IpScriptFieldExistsQueryTests.java | 2 +- .../query/IpScriptFieldRangeQueryTests.java | 2 +- .../query/IpScriptFieldTermQueryTests.java | 2 +- .../query/IpScriptFieldTermsQueryTests.java | 2 +- ...gScriptFieldDistanceFeatureQueryTests.java | 6 ++-- .../LongScriptFieldExistsQueryTests.java | 2 +- .../query/LongScriptFieldRangeQueryTests.java | 2 +- .../query/LongScriptFieldTermQueryTests.java | 2 +- .../query/LongScriptFieldTermsQueryTests.java | 2 +- .../StringScriptFieldExistsQueryTests.java | 2 +- .../StringScriptFieldFuzzyQueryTests.java | 2 +- .../StringScriptFieldPrefixQueryTests.java | 2 +- .../StringScriptFieldRangeQueryTests.java | 2 +- .../StringScriptFieldRegexpQueryTests.java | 2 +- .../StringScriptFieldTermQueryTests.java | 2 +- .../StringScriptFieldTermsQueryTests.java | 2 +- .../StringScriptFieldWildcardQueryTests.java | 2 +- .../RuntimeFieldsPainlessExtension.java | 36 ++++++++++--------- 131 files changed, 290 insertions(+), 286 deletions(-) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/BinaryScriptFieldData.java (97%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/BooleanScriptDocValues.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/BooleanScriptFieldData.java (96%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/DateScriptFieldData.java (96%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/DoubleScriptDocValues.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/DoubleScriptFieldData.java (96%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/GeoPointScriptDocValues.java (92%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/GeoPointScriptFieldData.java (96%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/IpScriptDocValues.java (90%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/IpScriptFieldData.java (93%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/LongScriptDocValues.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/LongScriptFieldData.java (96%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/StringScriptDocValues.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/fielddata/StringScriptFieldData.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/AbstractFieldScript.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/AbstractLongFieldScript.java (97%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/AbstractScriptFieldType.java (99%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/BooleanFieldScript.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/BooleanScriptFieldType.java (96%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DateFieldScript.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DateScriptFieldType.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DoubleFieldScript.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DoubleScriptFieldType.java (91%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java (96%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/GeoPointFieldScript.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/GeoPointScriptFieldType.java (93%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/IpFieldScript.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/IpScriptFieldType.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/KeywordScriptFieldType.java (90%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/LongFieldScript.java (97%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/LongScriptFieldType.java (92%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/mapper/StringFieldScript.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractBooleanScriptFieldQuery.java (88%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractDoubleScriptFieldQuery.java (91%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractGeoPointScriptFieldQuery.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractIpScriptFieldQuery.java (88%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractLongScriptFieldQuery.java (92%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractScriptFieldQuery.java (97%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java (92%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractStringScriptFieldQuery.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/BooleanScriptFieldExistsQuery.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/BooleanScriptFieldTermQuery.java (92%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/DoubleScriptFieldExistsQuery.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/DoubleScriptFieldRangeQuery.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/DoubleScriptFieldTermQuery.java (92%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/DoubleScriptFieldTermsQuery.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/GeoPointScriptFieldExistsQuery.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/IpScriptFieldExistsQuery.java (90%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/IpScriptFieldRangeQuery.java (95%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/IpScriptFieldTermQuery.java (93%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/IpScriptFieldTermsQuery.java (95%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java (98%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldExistsQuery.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldRangeQuery.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldTermQuery.java (92%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldTermsQuery.java (93%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldExistsQuery.java (89%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldFuzzyQuery.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldPrefixQuery.java (96%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldRangeQuery.java (97%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldRegexpQuery.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldTermQuery.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldTermsQuery.java (94%) rename server/src/main/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldWildcardQuery.java (95%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/BooleanFieldScriptTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/BooleanScriptFieldTypeTests.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DateFieldScriptTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DateScriptFieldTypeTests.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DoubleFieldScriptTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DoubleScriptFieldTypeTests.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/DynamicRuntimeTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/FieldScriptTestCase.java (95%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/GeoPointFieldScriptTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/GeoPointScriptFieldTypeTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/IpFieldScriptTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/IpScriptFieldTypeTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/KeywordScriptFieldTypeTests.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/LongFieldScriptTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/LongScriptFieldTypeTests.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/StringFieldScriptTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/mapper/TestScriptEngine.java (96%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java (93%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java (85%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java (85%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java (89%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java (85%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractScriptFieldQueryTestCase.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractScriptFieldQueryTests.java (93%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java (94%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/BooleanScriptFieldExistsQueryTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/BooleanScriptFieldTermQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/DoubleScriptFieldExistsQueryTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/DoubleScriptFieldRangeQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/DoubleScriptFieldTermQueryTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/DoubleScriptFieldTermsQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java (96%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/IpScriptFieldExistsQueryTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/IpScriptFieldRangeQueryTests.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/IpScriptFieldTermQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/IpScriptFieldTermsQueryTests.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java (96%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldExistsQueryTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldRangeQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldTermQueryTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/LongScriptFieldTermsQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldExistsQueryTests.java (97%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldFuzzyQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldPrefixQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldRangeQueryTests.java (99%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldRegexpQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldTermQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldTermsQueryTests.java (98%) rename server/src/test/java/org/elasticsearch/{xpack => }/runtimefields/query/StringScriptFieldWildcardQueryTests.java (98%) diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java index 79cd43deb2c7e..cdd55b60d7f64 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessPlugin.java @@ -37,6 +37,13 @@ import org.elasticsearch.repositories.RepositoriesService; import org.elasticsearch.rest.RestController; import org.elasticsearch.rest.RestHandler; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.runtimefields.mapper.DateFieldScript; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.runtimefields.mapper.LongFieldScript; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.IngestScript; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.ScriptContext; @@ -45,13 +52,6 @@ import org.elasticsearch.search.aggregations.pipeline.MovingFunctionScript; import org.elasticsearch.threadpool.ThreadPool; import org.elasticsearch.watcher.ResourceWatcherService; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.ArrayList; import java.util.Arrays; diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt index 4330474f9739f..3f1fc1aaa643e 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.boolean.txt @@ -9,13 +9,13 @@ # The whitelist for boolean-valued runtime fields # These two whitelists are required for painless to find the classes -class org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript @no_import { +class org.elasticsearch.runtimefields.mapper.BooleanFieldScript @no_import { } -class org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript$Factory @no_import { +class org.elasticsearch.runtimefields.mapper.BooleanFieldScript$Factory @no_import { } static_import { # The `emit` callback to collect values for the field - void emit(org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript, boolean) bound_to org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript$Emit + void emit(org.elasticsearch.runtimefields.mapper.BooleanFieldScript, boolean) bound_to org.elasticsearch.runtimefields.mapper.BooleanFieldScript$Emit } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt index b2b104d14ccf9..d4c734f0dc91a 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.date.txt @@ -9,16 +9,16 @@ # The whitelist for date-valued runtime fields # These two whitelists are required for painless to find the classes -class org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript @no_import { +class org.elasticsearch.runtimefields.mapper.DateFieldScript @no_import { } -class org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript$Factory @no_import { +class org.elasticsearch.runtimefields.mapper.DateFieldScript$Factory @no_import { } static_import { # The `emit` callback to collect values for the field - void emit(org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript, long) bound_to org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript$Emit + void emit(org.elasticsearch.runtimefields.mapper.DateFieldScript, long) bound_to org.elasticsearch.runtimefields.mapper.DateFieldScript$Emit # Parse a value from the source to millis since epoch - long parse(org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript, def) bound_to org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript$Parse + long parse(org.elasticsearch.runtimefields.mapper.DateFieldScript, def) bound_to org.elasticsearch.runtimefields.mapper.DateFieldScript$Parse } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt index d023f3eadb8a5..71a40dab06e56 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.double.txt @@ -9,13 +9,13 @@ # The whitelist for double-valued runtime fields # These two whitelists are required for painless to find the classes -class org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript @no_import { +class org.elasticsearch.runtimefields.mapper.DoubleFieldScript @no_import { } -class org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript$Factory @no_import { +class org.elasticsearch.runtimefields.mapper.DoubleFieldScript$Factory @no_import { } static_import { # The `emit` callback to collect values for the field - void emit(org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript, double) bound_to org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript$Emit + void emit(org.elasticsearch.runtimefields.mapper.DoubleFieldScript, double) bound_to org.elasticsearch.runtimefields.mapper.DoubleFieldScript$Emit } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt index e9960ec5637ec..e89f871309d61 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.geopoint.txt @@ -9,12 +9,12 @@ # The whitelist for ip-valued runtime fields # These two whitelists are required for painless to find the classes -class org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript @no_import { +class org.elasticsearch.runtimefields.mapper.GeoPointFieldScript @no_import { } -class org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript$Factory @no_import { +class org.elasticsearch.runtimefields.mapper.GeoPointFieldScript$Factory @no_import { } static_import { # The `emit` callback to collect values for the field - void emit(org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript, double, double) bound_to org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript$Emit + void emit(org.elasticsearch.runtimefields.mapper.GeoPointFieldScript, double, double) bound_to org.elasticsearch.runtimefields.mapper.GeoPointFieldScript$Emit } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt index e56e76cb1e416..a88c01c0f2e09 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.ip.txt @@ -9,12 +9,12 @@ # The whitelist for ip-valued runtime fields # These two whitelists are required for painless to find the classes -class org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript @no_import { +class org.elasticsearch.runtimefields.mapper.IpFieldScript @no_import { } -class org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript$Factory @no_import { +class org.elasticsearch.runtimefields.mapper.IpFieldScript$Factory @no_import { } static_import { # The `emit` callback to collect values for the field - void emit(org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript, String) bound_to org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript$Emit + void emit(org.elasticsearch.runtimefields.mapper.IpFieldScript, String) bound_to org.elasticsearch.runtimefields.mapper.IpFieldScript$Emit } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt index 1469a293dbdd3..a8919b8d36a31 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.long.txt @@ -9,12 +9,12 @@ # The whitelist for long-valued runtime fields # These two whitelists are required for painless to find the classes -class org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript @no_import { +class org.elasticsearch.runtimefields.mapper.LongFieldScript @no_import { } -class org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript$Factory @no_import { +class org.elasticsearch.runtimefields.mapper.LongFieldScript$Factory @no_import { } static_import { # The `emit` callback to collect values for the field - void emit(org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript, long) bound_to org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript$Emit + void emit(org.elasticsearch.runtimefields.mapper.LongFieldScript, long) bound_to org.elasticsearch.runtimefields.mapper.LongFieldScript$Emit } diff --git a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt index e603e793f050f..e70a128f255ce 100644 --- a/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt +++ b/modules/lang-painless/src/main/resources/org/elasticsearch/painless/spi/org.elasticsearch.runtimefields.string.txt @@ -9,12 +9,12 @@ # The whitelist for string-valued runtime fields # These two whitelists are required for painless to find the classes -class org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript @no_import { +class org.elasticsearch.runtimefields.mapper.StringFieldScript @no_import { } -class org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript$Factory @no_import { +class org.elasticsearch.runtimefields.mapper.StringFieldScript$Factory @no_import { } static_import { # The `emit` callback to collect values for the field - void emit(org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript, String) bound_to org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript$Emit + void emit(org.elasticsearch.runtimefields.mapper.StringFieldScript, String) bound_to org.elasticsearch.runtimefields.mapper.StringFieldScript$Emit } diff --git a/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java b/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java index c73272f681d11..aa693318e74c5 100644 --- a/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java +++ b/server/src/main/java/org/elasticsearch/index/mapper/DocumentParser.java @@ -42,7 +42,7 @@ final class DocumentParser { Function dateParserContext) { this.xContentRegistry = xContentRegistry; this.dateParserContext = dateParserContext; - this.dynamicRuntimeFieldsBuilder = org.elasticsearch.xpack.runtimefields.mapper.DynamicRuntimeFieldsBuilder.INSTANCE; + this.dynamicRuntimeFieldsBuilder = org.elasticsearch.runtimefields.mapper.DynamicRuntimeFieldsBuilder.INSTANCE; } ParsedDocument parseDocument(SourceToParse source, diff --git a/server/src/main/java/org/elasticsearch/indices/IndicesModule.java b/server/src/main/java/org/elasticsearch/indices/IndicesModule.java index 546f3eed6e07d..12e3797237274 100644 --- a/server/src/main/java/org/elasticsearch/indices/IndicesModule.java +++ b/server/src/main/java/org/elasticsearch/indices/IndicesModule.java @@ -51,13 +51,13 @@ import org.elasticsearch.indices.mapper.MapperRegistry; import org.elasticsearch.indices.store.IndicesStore; import org.elasticsearch.plugins.MapperPlugin; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanScriptFieldType; -import org.elasticsearch.xpack.runtimefields.mapper.DateScriptFieldType; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleScriptFieldType; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointScriptFieldType; -import org.elasticsearch.xpack.runtimefields.mapper.IpScriptFieldType; -import org.elasticsearch.xpack.runtimefields.mapper.KeywordScriptFieldType; -import org.elasticsearch.xpack.runtimefields.mapper.LongScriptFieldType; +import org.elasticsearch.runtimefields.mapper.BooleanScriptFieldType; +import org.elasticsearch.runtimefields.mapper.DateScriptFieldType; +import org.elasticsearch.runtimefields.mapper.DoubleScriptFieldType; +import org.elasticsearch.runtimefields.mapper.GeoPointScriptFieldType; +import org.elasticsearch.runtimefields.mapper.IpScriptFieldType; +import org.elasticsearch.runtimefields.mapper.KeywordScriptFieldType; +import org.elasticsearch.runtimefields.mapper.LongScriptFieldType; import java.util.Arrays; import java.util.Collections; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/BinaryScriptFieldData.java similarity index 97% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/BinaryScriptFieldData.java index 26ad66288a072..9fc2d7acdba17 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BinaryScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/BinaryScriptFieldData.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.SortField; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/BooleanScriptDocValues.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/BooleanScriptDocValues.java index 3fe3a33c7811b..4b94d29595c21 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/BooleanScriptDocValues.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.elasticsearch.index.fielddata.AbstractSortedNumericDocValues; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; public final class BooleanScriptDocValues extends AbstractSortedNumericDocValues { private final BooleanFieldScript script; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/BooleanScriptFieldData.java similarity index 96% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/BooleanScriptFieldData.java index 15827d2deb33b..b601a34e879d2 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/BooleanScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/BooleanScriptFieldData.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.SortedNumericDocValues; @@ -16,9 +16,9 @@ import org.elasticsearch.index.fielddata.IndexNumericFieldData; import org.elasticsearch.index.fielddata.plain.LeafLongFieldData; import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; import org.elasticsearch.search.aggregations.support.CoreValuesSourceType; import org.elasticsearch.search.aggregations.support.ValuesSourceType; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; public final class BooleanScriptFieldData extends IndexNumericFieldData { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/DateScriptFieldData.java similarity index 96% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/DateScriptFieldData.java index 151977a38403b..f530083e8c3e6 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DateScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/DateScriptFieldData.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.SortedNumericDocValues; @@ -16,9 +16,9 @@ import org.elasticsearch.index.fielddata.IndexNumericFieldData; import org.elasticsearch.index.fielddata.plain.LeafLongFieldData; import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.elasticsearch.runtimefields.mapper.DateFieldScript; import org.elasticsearch.search.aggregations.support.CoreValuesSourceType; import org.elasticsearch.search.aggregations.support.ValuesSourceType; -import org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript; public final class DateScriptFieldData extends IndexNumericFieldData { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/DoubleScriptDocValues.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/DoubleScriptDocValues.java index 24a960526a614..0fccc46052caa 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/DoubleScriptDocValues.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.elasticsearch.index.fielddata.SortedNumericDoubleValues; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/DoubleScriptFieldData.java similarity index 96% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/DoubleScriptFieldData.java index 52ed4b2eabe1b..5c9887e6db2d3 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/DoubleScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/DoubleScriptFieldData.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.ExceptionsHelper; @@ -16,9 +16,9 @@ import org.elasticsearch.index.fielddata.SortedNumericDoubleValues; import org.elasticsearch.index.fielddata.plain.LeafDoubleFieldData; import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import org.elasticsearch.search.aggregations.support.CoreValuesSourceType; import org.elasticsearch.search.aggregations.support.ValuesSourceType; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; public final class DoubleScriptFieldData extends IndexNumericFieldData { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/GeoPointScriptDocValues.java similarity index 92% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/GeoPointScriptDocValues.java index 5c17da13c8b16..16b6f2f2ce40a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/GeoPointScriptDocValues.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.geo.GeoEncodingUtils; import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.index.fielddata.MultiGeoPointValues; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/GeoPointScriptFieldData.java similarity index 96% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/GeoPointScriptFieldData.java index ba0bad3b71bc2..9d1fee30d0f5f 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/GeoPointScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/GeoPointScriptFieldData.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.SortField; @@ -18,13 +18,13 @@ import org.elasticsearch.index.fielddata.MultiGeoPointValues; import org.elasticsearch.index.fielddata.plain.AbstractLeafGeoPointFieldData; import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.MultiValueMode; import org.elasticsearch.search.aggregations.support.CoreValuesSourceType; import org.elasticsearch.search.aggregations.support.ValuesSourceType; import org.elasticsearch.search.sort.BucketedSort; import org.elasticsearch.search.sort.SortOrder; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; public class GeoPointScriptFieldData implements IndexGeoPointFieldData { public static class Builder implements IndexFieldData.Builder { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/IpScriptDocValues.java similarity index 90% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/IpScriptDocValues.java index 8bf55c02b9b0c..370ece76c484d 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/IpScriptDocValues.java @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.util.BytesRef; import org.elasticsearch.index.fielddata.SortedBinaryDocValues; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/IpScriptFieldData.java similarity index 93% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/IpScriptFieldData.java index 61f5335b606e2..e41a9c4083ea7 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/IpScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/IpScriptFieldData.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.document.InetAddressPoint; import org.apache.lucene.index.LeafReaderContext; @@ -20,9 +20,9 @@ import org.elasticsearch.index.fielddata.SortedBinaryDocValues; import org.elasticsearch.index.mapper.IpFieldMapper; import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; import org.elasticsearch.search.aggregations.support.CoreValuesSourceType; import org.elasticsearch.search.aggregations.support.ValuesSourceType; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; import java.net.InetAddress; @@ -60,7 +60,7 @@ public ScriptDocValues getScriptValues() { @Override public SortedBinaryDocValues getBytesValues() { - return new org.elasticsearch.xpack.runtimefields.fielddata.IpScriptDocValues(script); + return new org.elasticsearch.runtimefields.fielddata.IpScriptDocValues(script); } }; } diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/LongScriptDocValues.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/LongScriptDocValues.java index bfd67b167f774..8cd20493910cf 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/LongScriptDocValues.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.elasticsearch.index.fielddata.AbstractSortedNumericDocValues; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import java.util.Arrays; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/LongScriptFieldData.java similarity index 96% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/LongScriptFieldData.java index 35025bae80bdf..53dd9932d5395 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/LongScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/LongScriptFieldData.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.SortedNumericDocValues; @@ -16,9 +16,9 @@ import org.elasticsearch.index.fielddata.IndexNumericFieldData; import org.elasticsearch.index.fielddata.plain.LeafLongFieldData; import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.elasticsearch.runtimefields.mapper.LongFieldScript; import org.elasticsearch.search.aggregations.support.CoreValuesSourceType; import org.elasticsearch.search.aggregations.support.ValuesSourceType; -import org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript; import java.io.IOException; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/StringScriptDocValues.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/StringScriptDocValues.java index e16fcf0b3c956..1f60b4918e781 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptDocValues.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/StringScriptDocValues.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.elasticsearch.index.fielddata.SortingBinaryDocValues; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/StringScriptFieldData.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java rename to server/src/main/java/org/elasticsearch/runtimefields/fielddata/StringScriptFieldData.java index 6c6d0ead354a1..3ae258164d003 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/fielddata/StringScriptFieldData.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/fielddata/StringScriptFieldData.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.fielddata; +package org.elasticsearch.runtimefields.fielddata; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.index.fielddata.IndexFieldData; @@ -14,9 +14,9 @@ import org.elasticsearch.index.fielddata.ScriptDocValues; import org.elasticsearch.index.fielddata.SortedBinaryDocValues; import org.elasticsearch.indices.breaker.CircuitBreakerService; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.search.aggregations.support.CoreValuesSourceType; import org.elasticsearch.search.aggregations.support.ValuesSourceType; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; public class StringScriptFieldData extends BinaryScriptFieldData { public static class Builder implements IndexFieldData.Builder { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractFieldScript.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractFieldScript.java index 31b4f5a0dcc42..72165c8a3ca65 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.common.xcontent.support.XContentMapValues; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractLongFieldScript.java similarity index 97% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractLongFieldScript.java index 8cbe4cc14fe2c..ab4e30ea9914f 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractLongFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractLongFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.util.ArrayUtil; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractScriptFieldType.java similarity index 99% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractScriptFieldType.java index 5a43962730f76..0b04974b08ec6 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/AbstractScriptFieldType.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.search.MultiTermQuery; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/BooleanFieldScript.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/BooleanFieldScript.java index 5d8c4cd319790..f83f67a281acf 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/BooleanFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.common.Booleans; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/BooleanScriptFieldType.java similarity index 96% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/BooleanScriptFieldType.java index 262685f63dd25..8ef457b2a5d9c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/BooleanScriptFieldType.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.search.MatchNoDocsQuery; import org.apache.lucene.search.Query; @@ -20,12 +20,12 @@ import org.elasticsearch.index.mapper.BooleanFieldMapper; import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.query.SearchExecutionContext; +import org.elasticsearch.runtimefields.fielddata.BooleanScriptFieldData; +import org.elasticsearch.runtimefields.query.BooleanScriptFieldExistsQuery; +import org.elasticsearch.runtimefields.query.BooleanScriptFieldTermQuery; import org.elasticsearch.script.Script; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.fielddata.BooleanScriptFieldData; -import org.elasticsearch.xpack.runtimefields.query.BooleanScriptFieldExistsQuery; -import org.elasticsearch.xpack.runtimefields.query.BooleanScriptFieldTermQuery; import java.io.IOException; import java.time.ZoneId; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DateFieldScript.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/DateFieldScript.java index 2e953183bf9c1..f0683d094c1ab 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DateFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.common.time.DateFormatter; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DateScriptFieldType.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/DateScriptFieldType.java index 2504c1dbabbf9..a002be966f14e 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DateScriptFieldType.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import com.carrotsearch.hppc.LongHashSet; import com.carrotsearch.hppc.LongSet; @@ -25,15 +25,15 @@ import org.elasticsearch.index.mapper.FieldMapper; import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.query.SearchExecutionContext; +import org.elasticsearch.runtimefields.fielddata.DateScriptFieldData; +import org.elasticsearch.runtimefields.query.LongScriptFieldDistanceFeatureQuery; +import org.elasticsearch.runtimefields.query.LongScriptFieldExistsQuery; +import org.elasticsearch.runtimefields.query.LongScriptFieldRangeQuery; +import org.elasticsearch.runtimefields.query.LongScriptFieldTermQuery; +import org.elasticsearch.runtimefields.query.LongScriptFieldTermsQuery; import org.elasticsearch.script.Script; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.fielddata.DateScriptFieldData; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldDistanceFeatureQuery; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldExistsQuery; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldRangeQuery; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldTermQuery; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldTermsQuery; import java.io.IOException; import java.time.ZoneId; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DoubleFieldScript.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/DoubleFieldScript.java index 1434bdf77aa05..5187e7a35d85a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DoubleFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.util.ArrayUtil; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DoubleScriptFieldType.java similarity index 91% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/DoubleScriptFieldType.java index 82d7e6507b789..75d84436bd7eb 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DoubleScriptFieldType.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import com.carrotsearch.hppc.LongHashSet; import com.carrotsearch.hppc.LongSet; @@ -18,14 +18,14 @@ import org.elasticsearch.index.mapper.NumberFieldMapper.NumberType; import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.query.SearchExecutionContext; +import org.elasticsearch.runtimefields.fielddata.DoubleScriptFieldData; +import org.elasticsearch.runtimefields.query.DoubleScriptFieldExistsQuery; +import org.elasticsearch.runtimefields.query.DoubleScriptFieldRangeQuery; +import org.elasticsearch.runtimefields.query.DoubleScriptFieldTermQuery; +import org.elasticsearch.runtimefields.query.DoubleScriptFieldTermsQuery; import org.elasticsearch.script.Script; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.fielddata.DoubleScriptFieldData; -import org.elasticsearch.xpack.runtimefields.query.DoubleScriptFieldExistsQuery; -import org.elasticsearch.xpack.runtimefields.query.DoubleScriptFieldRangeQuery; -import org.elasticsearch.xpack.runtimefields.query.DoubleScriptFieldTermQuery; -import org.elasticsearch.xpack.runtimefields.query.DoubleScriptFieldTermsQuery; import java.io.IOException; import java.time.ZoneId; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java similarity index 96% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java index 6366b6cbf1c0c..f74a70e523e1e 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/DynamicRuntimeFieldsBuilder.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.elasticsearch.common.time.DateFormatter; import org.elasticsearch.index.mapper.RuntimeFieldType; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/GeoPointFieldScript.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/GeoPointFieldScript.java index b697aae9103f2..73931ea99eea1 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/GeoPointFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.LatLonDocValuesField; import org.apache.lucene.index.LeafReaderContext; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/GeoPointScriptFieldType.java similarity index 93% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/GeoPointScriptFieldType.java index 433f76460994a..16d73c0d1822c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/GeoPointScriptFieldType.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.geo.LatLonGeometry; import org.apache.lucene.geo.Point; @@ -25,12 +25,12 @@ import org.elasticsearch.index.mapper.GeoShapeQueryable; import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.query.SearchExecutionContext; +import org.elasticsearch.runtimefields.fielddata.GeoPointScriptFieldData; +import org.elasticsearch.runtimefields.query.GeoPointScriptFieldDistanceFeatureQuery; +import org.elasticsearch.runtimefields.query.GeoPointScriptFieldExistsQuery; +import org.elasticsearch.runtimefields.query.GeoPointScriptFieldGeoShapeQuery; import org.elasticsearch.script.Script; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.fielddata.GeoPointScriptFieldData; -import org.elasticsearch.xpack.runtimefields.query.GeoPointScriptFieldDistanceFeatureQuery; -import org.elasticsearch.xpack.runtimefields.query.GeoPointScriptFieldExistsQuery; -import org.elasticsearch.xpack.runtimefields.query.GeoPointScriptFieldGeoShapeQuery; import java.io.IOException; import java.time.ZoneId; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/IpFieldScript.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/IpFieldScript.java index 08df2409713eb..81fe0b77eb29c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/IpFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.InetAddressPoint; import org.apache.lucene.index.LeafReaderContext; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/IpScriptFieldType.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/IpScriptFieldType.java index 28e1d2eb093df..13a8a88f4589c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/IpScriptFieldType.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.InetAddressPoint; import org.apache.lucene.search.BooleanClause.Occur; @@ -24,14 +24,14 @@ import org.elasticsearch.index.mapper.IpFieldMapper; import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.query.SearchExecutionContext; +import org.elasticsearch.runtimefields.fielddata.IpScriptFieldData; +import org.elasticsearch.runtimefields.query.IpScriptFieldExistsQuery; +import org.elasticsearch.runtimefields.query.IpScriptFieldRangeQuery; +import org.elasticsearch.runtimefields.query.IpScriptFieldTermQuery; +import org.elasticsearch.runtimefields.query.IpScriptFieldTermsQuery; import org.elasticsearch.script.Script; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.fielddata.IpScriptFieldData; -import org.elasticsearch.xpack.runtimefields.query.IpScriptFieldExistsQuery; -import org.elasticsearch.xpack.runtimefields.query.IpScriptFieldRangeQuery; -import org.elasticsearch.xpack.runtimefields.query.IpScriptFieldTermQuery; -import org.elasticsearch.xpack.runtimefields.query.IpScriptFieldTermsQuery; import java.io.IOException; import java.net.InetAddress; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/KeywordScriptFieldType.java similarity index 90% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/KeywordScriptFieldType.java index 8948b6aec7557..d7e2a5dd85945 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/KeywordScriptFieldType.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.search.MultiTermQuery.RewriteMethod; import org.apache.lucene.search.Query; @@ -19,17 +19,17 @@ import org.elasticsearch.index.mapper.KeywordFieldMapper; import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.query.SearchExecutionContext; +import org.elasticsearch.runtimefields.fielddata.StringScriptFieldData; +import org.elasticsearch.runtimefields.query.StringScriptFieldExistsQuery; +import org.elasticsearch.runtimefields.query.StringScriptFieldFuzzyQuery; +import org.elasticsearch.runtimefields.query.StringScriptFieldPrefixQuery; +import org.elasticsearch.runtimefields.query.StringScriptFieldRangeQuery; +import org.elasticsearch.runtimefields.query.StringScriptFieldRegexpQuery; +import org.elasticsearch.runtimefields.query.StringScriptFieldTermQuery; +import org.elasticsearch.runtimefields.query.StringScriptFieldTermsQuery; +import org.elasticsearch.runtimefields.query.StringScriptFieldWildcardQuery; import org.elasticsearch.script.Script; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.fielddata.StringScriptFieldData; -import org.elasticsearch.xpack.runtimefields.query.StringScriptFieldExistsQuery; -import org.elasticsearch.xpack.runtimefields.query.StringScriptFieldFuzzyQuery; -import org.elasticsearch.xpack.runtimefields.query.StringScriptFieldPrefixQuery; -import org.elasticsearch.xpack.runtimefields.query.StringScriptFieldRangeQuery; -import org.elasticsearch.xpack.runtimefields.query.StringScriptFieldRegexpQuery; -import org.elasticsearch.xpack.runtimefields.query.StringScriptFieldTermQuery; -import org.elasticsearch.xpack.runtimefields.query.StringScriptFieldTermsQuery; -import org.elasticsearch.xpack.runtimefields.query.StringScriptFieldWildcardQuery; import java.io.IOException; import java.time.ZoneId; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/LongFieldScript.java similarity index 97% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/LongFieldScript.java index 42ecdbb910fcc..84c09c54cfe38 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/LongFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.index.mapper.NumberFieldMapper; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/LongScriptFieldType.java similarity index 92% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/LongScriptFieldType.java index 4868d19a1a304..73d7a5fc01503 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldType.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/LongScriptFieldType.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import com.carrotsearch.hppc.LongHashSet; import com.carrotsearch.hppc.LongSet; @@ -18,14 +18,14 @@ import org.elasticsearch.index.mapper.NumberFieldMapper.NumberType; import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.query.SearchExecutionContext; +import org.elasticsearch.runtimefields.fielddata.LongScriptFieldData; +import org.elasticsearch.runtimefields.query.LongScriptFieldExistsQuery; +import org.elasticsearch.runtimefields.query.LongScriptFieldRangeQuery; +import org.elasticsearch.runtimefields.query.LongScriptFieldTermQuery; +import org.elasticsearch.runtimefields.query.LongScriptFieldTermsQuery; import org.elasticsearch.script.Script; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.fielddata.LongScriptFieldData; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldExistsQuery; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldRangeQuery; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldTermQuery; -import org.elasticsearch.xpack.runtimefields.query.LongScriptFieldTermsQuery; import java.io.IOException; import java.time.ZoneId; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java b/server/src/main/java/org/elasticsearch/runtimefields/mapper/StringFieldScript.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java rename to server/src/main/java/org/elasticsearch/runtimefields/mapper/StringFieldScript.java index 05beb6f9c1031..42eb28ebba42c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScript.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/mapper/StringFieldScript.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.index.LeafReaderContext; import org.elasticsearch.script.ScriptContext; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractBooleanScriptFieldQuery.java similarity index 88% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/AbstractBooleanScriptFieldQuery.java index 6efc16249cdc3..5dee60be29a53 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractBooleanScriptFieldQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.search.QueryVisitor; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; /** * Abstract base class for building queries based on {@link DoubleFieldScript}. diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractDoubleScriptFieldQuery.java similarity index 91% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/AbstractDoubleScriptFieldQuery.java index f16080599cbc6..f5c85a2b51e30 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractDoubleScriptFieldQuery.java @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.search.QueryVisitor; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; /** * Abstract base class for building queries based on {@link DoubleFieldScript}. diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractGeoPointScriptFieldQuery.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/AbstractGeoPointScriptFieldQuery.java index 13a3e590bab3d..ec14317b79c4a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractGeoPointScriptFieldQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; /** * Abstract base class for building queries based on {@link GeoPointFieldScript}. diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractIpScriptFieldQuery.java similarity index 88% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/AbstractIpScriptFieldQuery.java index 698490ca4a945..d9305964a592f 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractIpScriptFieldQuery.java @@ -6,15 +6,15 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.document.InetAddressPoint; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.net.InetAddress; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractLongScriptFieldQuery.java similarity index 92% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/AbstractLongScriptFieldQuery.java index 62bb3d439456a..cd77d06b50249 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractLongScriptFieldQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.QueryVisitor; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; import java.util.function.Function; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQuery.java similarity index 97% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQuery.java index a77372a2b7691..af4fd81f0dd97 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQuery.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.search.ConstantScoreScorer; @@ -19,8 +19,8 @@ import org.apache.lucene.search.Scorer; import org.apache.lucene.search.TwoPhaseIterator; import org.apache.lucene.search.Weight; +import org.elasticsearch.runtimefields.mapper.AbstractFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractFieldScript; import java.io.IOException; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java similarity index 92% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java index a4936361f3cf3..6720f139ad07d 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldAutomatonQuery.java @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.search.QueryVisitor; import org.apache.lucene.util.BytesRefBuilder; import org.apache.lucene.util.automaton.ByteRunAutomaton; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldQuery.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldQuery.java index 34740524dcd7a..0512823210c49 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldExistsQuery.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldExistsQuery.java index 97ad49d09b3a1..80c200ae34e53 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldExistsQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; public class BooleanScriptFieldExistsQuery extends AbstractBooleanScriptFieldQuery { public BooleanScriptFieldExistsQuery(Script script, BooleanFieldScript.LeafFactory leafFactory, String fieldName) { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldTermQuery.java similarity index 92% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldTermQuery.java index 5f1ef90d516b5..cba184678f855 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldTermQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldExistsQuery.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldExistsQuery.java index 5af26d52f6b07..c4b80a26640c2 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldExistsQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; public class DoubleScriptFieldExistsQuery extends AbstractDoubleScriptFieldQuery { public DoubleScriptFieldExistsQuery(Script script, DoubleFieldScript.LeafFactory leafFactory, String fieldName) { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldRangeQuery.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldRangeQuery.java index a502f3b8ecc02..0c3e3b653a0a6 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldRangeQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermQuery.java similarity index 92% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermQuery.java index 07067537f1aef..a685768457244 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermsQuery.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermsQuery.java index 9e418faa9d6bc..8c669c92dfa41 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermsQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import com.carrotsearch.hppc.LongSet; import com.carrotsearch.hppc.cursors.LongCursor; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; import java.util.Arrays; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java index 2ec18fff15362..9d4b20c7af5e4 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldDistanceFeatureQuery.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.geo.GeoEncodingUtils; import org.apache.lucene.geo.GeoUtils; @@ -21,8 +21,8 @@ import org.apache.lucene.search.TwoPhaseIterator; import org.apache.lucene.search.Weight; import org.apache.lucene.util.SloppyMath; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; import java.io.IOException; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldExistsQuery.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldExistsQuery.java index cd2ec69629099..0947d7cc53a51 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldExistsQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; public class GeoPointScriptFieldExistsQuery extends AbstractGeoPointScriptFieldQuery { public GeoPointScriptFieldExistsQuery(Script script, GeoPointFieldScript.LeafFactory leafFactory, String fieldName) { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java index 84681cd93404a..0d929bee30ad0 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldGeoShapeQuery.java @@ -6,14 +6,14 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.geo.Component2D; import org.apache.lucene.geo.GeoEncodingUtils; import org.apache.lucene.geo.LatLonGeometry; import org.elasticsearch.common.geo.ShapeRelation; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; import java.util.Arrays; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldExistsQuery.java similarity index 90% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldExistsQuery.java index 36da904d5510e..8db71c21fc5cf 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldExistsQuery.java @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; public class IpScriptFieldExistsQuery extends AbstractIpScriptFieldQuery { public IpScriptFieldExistsQuery(Script script, IpFieldScript.LeafFactory leafFactory, String fieldName) { diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldRangeQuery.java similarity index 95% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldRangeQuery.java index 0de6a1e97e6de..f4ed9a6848a80 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldRangeQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.network.InetAddresses; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; import java.net.InetAddress; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermQuery.java similarity index 93% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermQuery.java index dae00815681d1..ff921f6f1a267 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.network.InetAddresses; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; import java.net.InetAddress; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermsQuery.java similarity index 95% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermsQuery.java index 7bbe3d380bd03..343d29ed2967a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermsQuery.java @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.network.InetAddresses; import org.elasticsearch.common.util.BytesRefHash; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java similarity index 98% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java index 2d5eff669923f..e1eb0ff645b3e 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldDistanceFeatureQuery.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.LeafReaderContext; import org.apache.lucene.index.Term; @@ -18,8 +18,8 @@ import org.apache.lucene.search.Scorer; import org.apache.lucene.search.TwoPhaseIterator; import org.apache.lucene.search.Weight; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; import java.io.IOException; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldExistsQuery.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldExistsQuery.java index 8324b631e010e..065f66f5ed65c 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldExistsQuery.java @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.LeafReaderContext; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; import java.util.function.Function; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldRangeQuery.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldRangeQuery.java index f008b12d05237..1a76754e790d0 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldRangeQuery.java @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.LeafReaderContext; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; import java.util.Objects; import java.util.function.Function; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermQuery.java similarity index 92% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermQuery.java index 16fcb6fe64e7a..aef02549c225d 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermQuery.java @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.LeafReaderContext; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; import java.util.Objects; import java.util.function.Function; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermsQuery.java similarity index 93% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermsQuery.java index 06ae7ccc8824a..4410d40feb724 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermsQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import com.carrotsearch.hppc.LongSet; import org.apache.lucene.index.LeafReaderContext; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; import java.util.Objects; import java.util.function.Function; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldExistsQuery.java similarity index 89% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldExistsQuery.java index 9cda2eab959e3..28724f697c5fe 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldExistsQuery.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.List; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldFuzzyQuery.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldFuzzyQuery.java index b1188684b96f4..fa4c8d5d794f1 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldFuzzyQuery.java @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.FuzzyQuery; import org.apache.lucene.util.automaton.ByteRunAutomaton; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldPrefixQuery.java similarity index 96% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldPrefixQuery.java index 11d5a9400d0fa..25a35d23b718d 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldPrefixQuery.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.search.PrefixQuery; import org.apache.lucene.search.QueryVisitor; @@ -14,8 +14,8 @@ import org.apache.lucene.util.automaton.Automaton; import org.apache.lucene.util.automaton.ByteRunAutomaton; import org.elasticsearch.common.lucene.search.AutomatonQueries; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.List; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldRangeQuery.java similarity index 97% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldRangeQuery.java index 02d3e07fd5948..e455e2b080b3f 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldRangeQuery.java @@ -6,14 +6,14 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.search.QueryVisitor; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.automaton.Automata; import org.apache.lucene.util.automaton.ByteRunAutomaton; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.List; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldRegexpQuery.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldRegexpQuery.java index ffb018dfea318..0eb39bbafd996 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldRegexpQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.automaton.ByteRunAutomaton; import org.apache.lucene.util.automaton.RegExp; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermQuery.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermQuery.java index a48f0eb24924e..066ca4d063b36 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.QueryVisitor; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.List; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermsQuery.java similarity index 94% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermsQuery.java index 32ae16aebbde3..6fff6d879eb2a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermsQuery.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.QueryVisitor; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.List; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldWildcardQuery.java similarity index 95% rename from server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java rename to server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldWildcardQuery.java index fc156945d37c5..72e52c8565f8a 100644 --- a/server/src/main/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQuery.java +++ b/server/src/main/java/org/elasticsearch/runtimefields/query/StringScriptFieldWildcardQuery.java @@ -6,15 +6,15 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.WildcardQuery; import org.apache.lucene.util.automaton.Automaton; import org.apache.lucene.util.automaton.ByteRunAutomaton; import org.elasticsearch.common.lucene.search.AutomatonQueries; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.Script; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.Objects; diff --git a/server/src/main/java/org/elasticsearch/script/ScriptModule.java b/server/src/main/java/org/elasticsearch/script/ScriptModule.java index beecf78b7dbda..8485ecd722e30 100644 --- a/server/src/main/java/org/elasticsearch/script/ScriptModule.java +++ b/server/src/main/java/org/elasticsearch/script/ScriptModule.java @@ -12,14 +12,14 @@ import org.elasticsearch.common.settings.Settings; import org.elasticsearch.index.query.IntervalFilterScript; import org.elasticsearch.plugins.ScriptPlugin; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.runtimefields.mapper.DateFieldScript; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.runtimefields.mapper.LongFieldScript; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.search.aggregations.pipeline.MovingFunctionScript; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.LongFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; import java.util.Collections; import java.util.HashMap; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java index 1c61009ea91b7..7882c485c6a82 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/AbstractNonTextScriptFieldTypeTestCase.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.util.automaton.Operations; import org.elasticsearch.common.unit.Fuzziness; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java index 2c8eb0139e695..001688efe9c85 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/AbstractScriptFieldTypeTestCase.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.index.IndexReader; import org.apache.lucene.search.Query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/BooleanFieldScriptTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/BooleanFieldScriptTests.java index 7cc22d1fce863..6c2d88584505b 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/BooleanFieldScriptTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/BooleanScriptFieldTypeTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/BooleanScriptFieldTypeTests.java index 76d9e9e23b9b3..844d33867fd7b 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/BooleanScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/BooleanScriptFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; @@ -41,6 +41,7 @@ import org.elasticsearch.index.mapper.SourceToParse; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.ScriptPlugin; +import org.elasticsearch.runtimefields.fielddata.BooleanScriptFieldData; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; @@ -50,7 +51,6 @@ import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.runtimefields.fielddata.BooleanScriptFieldData; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DateFieldScriptTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/DateFieldScriptTests.java index 3be6a0fc157de..9744c5f88dd3d 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DateFieldScriptTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DateScriptFieldTypeTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/DateScriptFieldTypeTests.java index c3b86f7626cd6..f703f60fa4406 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DateScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DateScriptFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; @@ -44,6 +44,7 @@ import org.elasticsearch.index.mapper.ParsedDocument; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.ScriptPlugin; +import org.elasticsearch.runtimefields.fielddata.DateScriptFieldData; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; @@ -52,7 +53,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.fielddata.DateScriptFieldData; import java.io.IOException; import java.time.Instant; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DoubleFieldScriptTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/DoubleFieldScriptTests.java index c7198dbb74b48..55df2f31e8ed9 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DoubleFieldScriptTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DoubleScriptFieldTypeTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/DoubleScriptFieldTypeTests.java index 12230145525be..e57d9249f4130 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DoubleScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DoubleScriptFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; @@ -32,6 +32,7 @@ import org.elasticsearch.index.mapper.MappedFieldType; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.ScriptPlugin; +import org.elasticsearch.runtimefields.fielddata.DoubleScriptFieldData; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; @@ -40,7 +41,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.fielddata.DoubleScriptFieldData; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DynamicRuntimeTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/DynamicRuntimeTests.java index bed60e5124e5c..94b2c8930d39d 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/DynamicRuntimeTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/DynamicRuntimeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.elasticsearch.common.Strings; import org.elasticsearch.index.mapper.DocumentMapper; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/FieldScriptTestCase.java similarity index 95% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/FieldScriptTestCase.java index 64bfa51361986..95102ad4eb5e6 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/FieldScriptTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/FieldScriptTestCase.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/GeoPointFieldScriptTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/GeoPointFieldScriptTests.java index 823df40f876a7..ff29479348c0a 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/GeoPointFieldScriptTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/GeoPointScriptFieldTypeTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/GeoPointScriptFieldTypeTests.java index 6d55f61cbd612..c7f6763ebc297 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/GeoPointScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/GeoPointScriptFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; @@ -31,6 +31,7 @@ import org.elasticsearch.index.mapper.MappedFieldType; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.ScriptPlugin; +import org.elasticsearch.runtimefields.fielddata.GeoPointScriptFieldData; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; @@ -39,7 +40,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.fielddata.GeoPointScriptFieldData; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/IpFieldScriptTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/IpFieldScriptTests.java index 3555e57ca49f1..6cc01b8a4c5bc 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/IpFieldScriptTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/IpScriptFieldTypeTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/IpScriptFieldTypeTests.java index 7945d5f53b8b9..eac1bfcff01ae 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/IpScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/IpScriptFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; @@ -31,6 +31,8 @@ import org.elasticsearch.index.mapper.MappedFieldType; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.ScriptPlugin; +import org.elasticsearch.runtimefields.fielddata.BinaryScriptFieldData; +import org.elasticsearch.runtimefields.fielddata.IpScriptFieldData; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; @@ -40,8 +42,6 @@ import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.fielddata.BinaryScriptFieldData; -import org.elasticsearch.xpack.runtimefields.fielddata.IpScriptFieldData; import java.io.IOException; import java.time.ZoneId; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/KeywordScriptFieldTypeTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/KeywordScriptFieldTypeTests.java index 461c2672e72a7..475426a991a29 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/KeywordScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/KeywordScriptFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; @@ -35,6 +35,8 @@ import org.elasticsearch.index.query.MatchQueryBuilder; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.ScriptPlugin; +import org.elasticsearch.runtimefields.fielddata.BinaryScriptFieldData; +import org.elasticsearch.runtimefields.fielddata.StringScriptFieldData; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; @@ -43,8 +45,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.fielddata.BinaryScriptFieldData; -import org.elasticsearch.xpack.runtimefields.fielddata.StringScriptFieldData; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/LongFieldScriptTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/LongFieldScriptTests.java index a68596c78a686..10f08465b1247 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/LongFieldScriptTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/LongScriptFieldTypeTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/LongScriptFieldTypeTests.java index a82794c403dff..7957858a2442d 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/LongScriptFieldTypeTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/LongScriptFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; @@ -36,6 +36,7 @@ import org.elasticsearch.index.mapper.ParsedDocument; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.ScriptPlugin; +import org.elasticsearch.runtimefields.fielddata.LongScriptFieldData; import org.elasticsearch.script.ScoreScript; import org.elasticsearch.script.Script; import org.elasticsearch.script.ScriptContext; @@ -44,7 +45,6 @@ import org.elasticsearch.script.ScriptService; import org.elasticsearch.script.ScriptType; import org.elasticsearch.search.MultiValueMode; -import org.elasticsearch.xpack.runtimefields.fielddata.LongScriptFieldData; import java.io.IOException; import java.util.ArrayList; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/StringFieldScriptTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/StringFieldScriptTests.java index 283e52c907a6b..265733e6259b2 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/StringFieldScriptTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/StringFieldScriptTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java b/server/src/test/java/org/elasticsearch/runtimefields/mapper/TestScriptEngine.java similarity index 96% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java rename to server/src/test/java/org/elasticsearch/runtimefields/mapper/TestScriptEngine.java index fdbba866ab02e..0ea7bc98c5184 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/mapper/TestScriptEngine.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/mapper/TestScriptEngine.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.mapper; +package org.elasticsearch.runtimefields.mapper; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.script.ScriptContext; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java similarity index 93% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java index 2700a2293bf83..dbbafefe9b59f 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractBooleanScriptFieldQueryTestCase.java @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.search.QueryVisitor; import org.apache.lucene.util.automaton.ByteRunAutomaton; -import org.elasticsearch.xpack.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; import java.util.ArrayList; import java.util.List; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java similarity index 85% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java index 27a2c96455650..ef19cd9d24522 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractDoubleScriptFieldQueryTestCase.java @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; -import org.elasticsearch.xpack.runtimefields.mapper.DoubleFieldScript; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; import static org.mockito.Mockito.mock; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java similarity index 85% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java index 3093bf809e519..073f4cd63ef18 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractGeoPointScriptFieldQueryTestCase.java @@ -6,9 +6,9 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; import static org.mockito.Mockito.mock; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java similarity index 89% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java index 6e9fa97c39128..27c186e5ad7ec 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractIpScriptFieldQueryTestCase.java @@ -6,11 +6,11 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.document.InetAddressPoint; import org.apache.lucene.util.BytesRef; -import org.elasticsearch.xpack.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; import java.net.InetAddress; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java similarity index 85% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java index f2b1875929772..b668edbe65f11 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractLongScriptFieldQueryTestCase.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.LeafReaderContext; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; import java.util.function.Function; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQueryTestCase.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQueryTestCase.java index 4b734898bdb03..c457248b749d8 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQueryTestCase.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQueryTests.java similarity index 93% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQueryTests.java index 2b28749096923..aa1adef736676 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractScriptFieldQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractScriptFieldQueryTests.java @@ -6,12 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.search.Explanation; +import org.elasticsearch.runtimefields.mapper.AbstractFieldScript; import org.elasticsearch.script.Script; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractFieldScript; import java.io.IOException; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java similarity index 94% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java index 77d270b362a12..9ae83d663d4d6 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/AbstractStringScriptFieldQueryTestCase.java @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; import org.apache.lucene.search.QueryVisitor; import org.apache.lucene.util.automaton.ByteRunAutomaton; -import org.elasticsearch.xpack.runtimefields.mapper.StringFieldScript; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import java.util.ArrayList; import java.util.List; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldExistsQueryTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldExistsQueryTests.java index 6aac7505f8984..2c306bc246a64 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldExistsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldTermQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldTermQueryTests.java index bcde6d0969a74..996ad88afc8f1 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/BooleanScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/BooleanScriptFieldTermQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.elasticsearch.script.Script; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldExistsQueryTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldExistsQueryTests.java index df9c6dd1bdd04..565f4803a88ab 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldExistsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldRangeQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldRangeQueryTests.java index 2e5d05077c0c8..179a0447ef325 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldRangeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldRangeQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.elasticsearch.script.Script; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermQueryTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermQueryTests.java index 263bae6cc2008..2e6b63f839a02 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.elasticsearch.script.Script; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermsQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermsQueryTests.java index 3384688736aa2..2a926a62f630a 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/DoubleScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/DoubleScriptFieldTermsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import com.carrotsearch.hppc.LongHashSet; import com.carrotsearch.hppc.LongSet; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java similarity index 96% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java index b2cc1f41ff11c..5fa8a29ff2270 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldDistanceFeatureQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.document.StoredField; import org.apache.lucene.geo.GeoTestUtil; @@ -20,10 +20,10 @@ import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.geo.GeoPoint; import org.elasticsearch.common.geo.GeoUtils; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; import org.elasticsearch.script.Script; import org.elasticsearch.search.lookup.SearchLookup; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.GeoPointFieldScript; import java.io.IOException; import java.util.List; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java index d5ba441194e02..ab075d3772605 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldExistsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java index 69d807b7c6c18..79f15428da409 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/GeoPointScriptFieldGeoShapeQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.geo.Polygon; import org.elasticsearch.common.geo.ShapeRelation; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldExistsQueryTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldExistsQueryTests.java index 2a4925f405743..2df60dccac286 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldExistsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldRangeQueryTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldRangeQueryTests.java index 8dbf4c5999177..1ba0010e02261 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldRangeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldRangeQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.network.InetAddresses; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermQueryTests.java index 34ec1bc258ae9..7439836cc3790 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.network.InetAddresses; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermsQueryTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermsQueryTests.java index 160f07ccf8940..1234033689a1d 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/IpScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/IpScriptFieldTermsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.document.InetAddressPoint; import org.apache.lucene.util.BytesRef; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java similarity index 96% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java index 5cb929cb75973..757b26cddb1a0 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldDistanceFeatureQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.document.StoredField; import org.apache.lucene.index.DirectoryReader; @@ -17,11 +17,11 @@ import org.apache.lucene.search.TopDocs; import org.apache.lucene.store.Directory; import org.apache.lucene.util.BytesRef; +import org.elasticsearch.runtimefields.mapper.AbstractLongFieldScript; +import org.elasticsearch.runtimefields.mapper.DateFieldScript; import org.elasticsearch.script.Script; import org.elasticsearch.search.lookup.SearchLookup; import org.elasticsearch.test.ESTestCase; -import org.elasticsearch.xpack.runtimefields.mapper.AbstractLongFieldScript; -import org.elasticsearch.xpack.runtimefields.mapper.DateFieldScript; import java.io.IOException; import java.util.List; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldExistsQueryTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldExistsQueryTests.java index 653c8b3436353..095f580fb7a91 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldExistsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import static org.hamcrest.Matchers.equalTo; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldRangeQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldRangeQueryTests.java index 7c9f91c9bcaf6..20368894f0b1e 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldRangeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldRangeQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.elasticsearch.script.Script; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermQueryTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermQueryTests.java index 030ffce0d9360..26a999b78ebda 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.elasticsearch.script.Script; import org.elasticsearch.test.ESTestCase; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermsQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermsQueryTests.java index acd76bfc44aae..35a01caeae560 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/LongScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/LongScriptFieldTermsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import com.carrotsearch.hppc.LongHashSet; import com.carrotsearch.hppc.LongSet; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldExistsQueryTests.java similarity index 97% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldExistsQueryTests.java index 8e9b80ae89dfa..a09b3a845c91b 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldExistsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldExistsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldFuzzyQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldFuzzyQueryTests.java index f63c1b711c214..6bd9a81346d93 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldFuzzyQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldFuzzyQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.automaton.ByteRunAutomaton; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldPrefixQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldPrefixQueryTests.java index c2d6053ffc78b..190dad908ea85 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldPrefixQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldPrefixQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.automaton.ByteRunAutomaton; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldRangeQueryTests.java similarity index 99% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldRangeQueryTests.java index dfa6548c94411..fa374f4300fa4 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRangeQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldRangeQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.automaton.ByteRunAutomaton; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldRegexpQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldRegexpQueryTests.java index 6c2fe213bda93..a4bffde84fb3f 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldRegexpQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldRegexpQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.automaton.ByteRunAutomaton; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermQueryTests.java index 889b264d00c54..dc788cac55fe1 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermsQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermsQueryTests.java index bd2b63d518912..f6bb1887651c3 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldTermsQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldTermsQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.index.Term; import org.apache.lucene.search.Query; diff --git a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldWildcardQueryTests.java similarity index 98% rename from server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java rename to server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldWildcardQueryTests.java index b8f3638303261..93344cee19fd9 100644 --- a/server/src/test/java/org/elasticsearch/xpack/runtimefields/query/StringScriptFieldWildcardQueryTests.java +++ b/server/src/test/java/org/elasticsearch/runtimefields/query/StringScriptFieldWildcardQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.xpack.runtimefields.query; +package org.elasticsearch.runtimefields.query; import org.apache.lucene.util.BytesRef; import org.apache.lucene.util.automaton.ByteRunAutomaton; diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java index 009a848bd7b78..f7c4c1474e744 100644 --- a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java +++ b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java @@ -12,6 +12,14 @@ import org.elasticsearch.painless.spi.WhitelistInstanceBinding; import org.elasticsearch.painless.spi.WhitelistLoader; import org.elasticsearch.painless.spi.annotation.CompileTimeOnlyAnnotation; +import org.elasticsearch.runtimefields.mapper.AbstractFieldScript; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.runtimefields.mapper.DateFieldScript; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.runtimefields.mapper.LongFieldScript; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.script.ScriptContext; import org.elasticsearch.xpack.runtimefields.RuntimeFields; @@ -19,13 +27,12 @@ import java.util.Map; public class RuntimeFieldsPainlessExtension implements PainlessExtension { - private final Whitelist commonWhitelist = WhitelistLoader.loadFromResourceFiles( - RuntimeFieldsPainlessExtension.class, "common_whitelist.txt"); - - private final Whitelist grokWhitelist; + private final List whitelists; public RuntimeFieldsPainlessExtension(RuntimeFields plugin) { - grokWhitelist = new Whitelist( + Whitelist commonWhitelist = WhitelistLoader.loadFromResourceFiles( + RuntimeFieldsPainlessExtension.class, "common_whitelist.txt"); + Whitelist grokWhitelist = new Whitelist( commonWhitelist.classLoader, List.of(), List.of(), @@ -41,22 +48,19 @@ public RuntimeFieldsPainlessExtension(RuntimeFields plugin) { ) ) ); - } - - private List load(String path) { - return List.of(commonWhitelist, grokWhitelist); + this.whitelists = List.of(commonWhitelist, grokWhitelist); } @Override public Map, List> getContextWhitelists() { return Map.ofEntries( - Map.entry(BooleanFieldScript.CONTEXT, load("boolean_whitelist.txt")), - Map.entry(DateFieldScript.CONTEXT, load("date_whitelist.txt")), - Map.entry(DoubleFieldScript.CONTEXT, load("double_whitelist.txt")), - Map.entry(GeoPointFieldScript.CONTEXT, load("geo_point_whitelist.txt")), - Map.entry(IpFieldScript.CONTEXT, load("ip_whitelist.txt")), - Map.entry(LongFieldScript.CONTEXT, load("long_whitelist.txt")), - Map.entry(StringFieldScript.CONTEXT, load("string_whitelist.txt")) + Map.entry(BooleanFieldScript.CONTEXT, whitelists), + Map.entry(DateFieldScript.CONTEXT, whitelists), + Map.entry(DoubleFieldScript.CONTEXT, whitelists), + Map.entry(GeoPointFieldScript.CONTEXT, whitelists), + Map.entry(IpFieldScript.CONTEXT, whitelists), + Map.entry(LongFieldScript.CONTEXT, whitelists), + Map.entry(StringFieldScript.CONTEXT, whitelists) ); } } From ded43252594c46c443fae93a99c04c0443738fee Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Thu, 18 Feb 2021 22:10:02 +0100 Subject: [PATCH 10/16] remove test plugin --- .../index/mapper/DocumentParserTests.java | 38 +++++++++---------- .../index/mapper/DynamicMappingTests.java | 8 ---- .../index/mapper/TestRuntimeField.java | 14 ------- .../query/SearchExecutionContextTests.java | 33 +++++++--------- .../indices/IndicesModuleTests.java | 9 ++++- 5 files changed, 40 insertions(+), 62 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/mapper/DocumentParserTests.java b/server/src/test/java/org/elasticsearch/index/mapper/DocumentParserTests.java index 6f6d62f6683fa..c6b005c9546be 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/DocumentParserTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/DocumentParserTests.java @@ -8,24 +8,6 @@ package org.elasticsearch.index.mapper; -import static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath; -import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.instanceOf; -import static org.hamcrest.Matchers.not; -import static org.hamcrest.Matchers.notNullValue; - -import java.io.IOException; -import java.math.BigDecimal; -import java.math.BigInteger; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; -import java.util.Map; - import org.apache.lucene.document.Field; import org.apache.lucene.document.StringField; import org.apache.lucene.index.IndexableField; @@ -42,11 +24,29 @@ import org.elasticsearch.plugins.MapperPlugin; import org.elasticsearch.plugins.Plugin; +import java.io.IOException; +import java.math.BigDecimal; +import java.math.BigInteger; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +import static org.elasticsearch.test.StreamsUtils.copyToBytesFromClasspath; +import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.equalTo; +import static org.hamcrest.Matchers.instanceOf; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.Matchers.notNullValue; + public class DocumentParserTests extends MapperServiceTestCase { @Override protected Collection getPlugins() { - return List.of(new DocumentParserTestsPlugin(), new TestRuntimeField.Plugin()); + return List.of(new DocumentParserTestsPlugin()); } public void testParseWithRuntimeField() throws Exception { diff --git a/server/src/test/java/org/elasticsearch/index/mapper/DynamicMappingTests.java b/server/src/test/java/org/elasticsearch/index/mapper/DynamicMappingTests.java index ddcb5d0f7cafa..d0dd94f142f3e 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/DynamicMappingTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/DynamicMappingTests.java @@ -12,12 +12,9 @@ import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; -import org.elasticsearch.plugins.Plugin; import java.io.IOException; import java.time.Instant; -import java.util.Collection; -import java.util.Collections; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.Matchers.equalTo; @@ -27,11 +24,6 @@ public class DynamicMappingTests extends MapperServiceTestCase { - @Override - protected Collection getPlugins() { - return Collections.singletonList(new TestRuntimeField.Plugin()); - } - private XContentBuilder dynamicMapping(String dynamicValue, CheckedConsumer buildFields) throws IOException { return topMapping(b -> { diff --git a/server/src/test/java/org/elasticsearch/index/mapper/TestRuntimeField.java b/server/src/test/java/org/elasticsearch/index/mapper/TestRuntimeField.java index e2d775ec78dfb..0baefc46d80b1 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/TestRuntimeField.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/TestRuntimeField.java @@ -11,11 +11,9 @@ import org.apache.lucene.search.Query; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.query.SearchExecutionContext; -import org.elasticsearch.plugins.MapperPlugin; import java.io.IOException; import java.util.Collections; -import java.util.Map; public class TestRuntimeField extends RuntimeFieldType { @@ -44,16 +42,4 @@ public String typeName() { public Query termQuery(Object value, SearchExecutionContext context) { return null; } - - public static class Plugin extends org.elasticsearch.plugins.Plugin implements MapperPlugin { - @Override - public Map getRuntimeFieldTypes() { - return Map.of( - "keyword", (name, node, parserContext) -> new TestRuntimeField(name, "keyword"), - "double", (name, node, parserContext) -> new TestRuntimeField(name, "double"), - "long", (name, node, parserContext) -> new TestRuntimeField(name, "long"), - "boolean", (name, node, parserContext) -> new TestRuntimeField(name, "boolean"), - "date", (name, node, parserContext) -> new TestRuntimeField(name, "date")); - } - } } diff --git a/server/src/test/java/org/elasticsearch/index/query/SearchExecutionContextTests.java b/server/src/test/java/org/elasticsearch/index/query/SearchExecutionContextTests.java index 5912b58d0f916..28f9a6e0eeb11 100644 --- a/server/src/test/java/org/elasticsearch/index/query/SearchExecutionContextTests.java +++ b/server/src/test/java/org/elasticsearch/index/query/SearchExecutionContextTests.java @@ -59,7 +59,8 @@ import org.elasticsearch.index.mapper.TextFieldMapper; import org.elasticsearch.indices.IndicesModule; import org.elasticsearch.indices.mapper.MapperRegistry; -import org.elasticsearch.plugins.MapperPlugin; +import org.elasticsearch.runtimefields.mapper.KeywordScriptFieldType; +import org.elasticsearch.runtimefields.mapper.LongScriptFieldType; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.MultiValueMode; import org.elasticsearch.search.aggregations.support.ValuesSourceType; @@ -316,7 +317,7 @@ public void testFielddataLookupOneFieldManyReferences() throws IOException { } assertEquals( List.of(expected.toString(), expected.toString()), - collect("root", createSearchExecutionContext("uuid", null, createMappingLookup(List.of(), fields), Map.of(), List.of())) + collect("root", createSearchExecutionContext("uuid", null, createMappingLookup(List.of(), fields), Map.of())) ); } @@ -343,13 +344,12 @@ public void testSearchRequestRuntimeFields() { "uuid", null, createMappingLookup(List.of(new MockFieldMapper.FakeFieldType("pig"), new MockFieldMapper.FakeFieldType("cat")), List.of()), - runtimeMappings, - Collections.singletonList(new TestRuntimeField.Plugin())); + runtimeMappings); assertTrue(context.isFieldMapped("cat")); - assertThat(context.getFieldType("cat"), instanceOf(TestRuntimeField.class)); + assertThat(context.getFieldType("cat"), instanceOf(KeywordScriptFieldType.class)); assertThat(context.simpleMatchToIndexNames("cat"), equalTo(Set.of("cat"))); assertTrue(context.isFieldMapped("dog")); - assertThat(context.getFieldType("dog"), instanceOf(TestRuntimeField.class)); + assertThat(context.getFieldType("dog"), instanceOf(LongScriptFieldType.class)); assertThat(context.simpleMatchToIndexNames("dog"), equalTo(Set.of("dog"))); assertTrue(context.isFieldMapped("pig")); assertThat(context.getFieldType("pig"), instanceOf(MockFieldMapper.FakeFieldType.class)); @@ -364,8 +364,7 @@ public void testSearchRequestRuntimeFieldsWrongFormat() { "uuid", null, createMappingLookup(List.of(new MockFieldMapper.FakeFieldType("pig"), new MockFieldMapper.FakeFieldType("cat")), List.of()), - runtimeMappings, - Collections.singletonList(new TestRuntimeField.Plugin()))); + runtimeMappings)); assertEquals("Expected map for runtime field [field] definition but got a java.util.Arrays$ArrayList", exception.getMessage()); } @@ -376,13 +375,12 @@ public void testSearchRequestRuntimeFieldsRemoval() { "uuid", null, createMappingLookup(List.of(new MockFieldMapper.FakeFieldType("pig"), new MockFieldMapper.FakeFieldType("cat")), List.of()), - runtimeMappings, - Collections.singletonList(new TestRuntimeField.Plugin()))); + runtimeMappings)); assertEquals("Runtime field [field] was set to null but its removal is not supported in this context", exception.getMessage()); } public static SearchExecutionContext createSearchExecutionContext(String indexUuid, String clusterAlias) { - return createSearchExecutionContext(indexUuid, clusterAlias, MappingLookup.EMPTY, Map.of(), List.of()); + return createSearchExecutionContext(indexUuid, clusterAlias, MappingLookup.EMPTY, Map.of()); } private static SearchExecutionContext createSearchExecutionContext(RuntimeFieldType... fieldTypes) { @@ -390,8 +388,7 @@ private static SearchExecutionContext createSearchExecutionContext(RuntimeFieldT "uuid", null, createMappingLookup(Collections.emptyList(), List.of(fieldTypes)), - Collections.emptyMap(), - Collections.emptyList() + Collections.emptyMap() ); } @@ -399,8 +396,7 @@ private static SearchExecutionContext createSearchExecutionContext( String indexUuid, String clusterAlias, MappingLookup mappingLookup, - Map runtimeMappings, - List mapperPlugins + Map runtimeMappings ) { IndexMetadata.Builder indexMetadataBuilder = new IndexMetadata.Builder("index"); indexMetadataBuilder.settings(Settings.builder().put("index.version.created", Version.CURRENT) @@ -410,7 +406,7 @@ private static SearchExecutionContext createSearchExecutionContext( ); IndexMetadata indexMetadata = indexMetadataBuilder.build(); IndexSettings indexSettings = new IndexSettings(indexMetadata, Settings.EMPTY); - MapperService mapperService = createMapperService(indexSettings, mapperPlugins); + MapperService mapperService = createMapperService(indexSettings); final long nowInMillis = randomNonNegativeLong(); return new SearchExecutionContext( 0, @@ -436,15 +432,14 @@ private static SearchExecutionContext createSearchExecutionContext( } private static MapperService createMapperService( - IndexSettings indexSettings, - List mapperPlugins + IndexSettings indexSettings ) { IndexAnalyzers indexAnalyzers = new IndexAnalyzers( singletonMap("default", new NamedAnalyzer("default", AnalyzerScope.INDEX, null)), emptyMap(), emptyMap() ); - IndicesModule indicesModule = new IndicesModule(mapperPlugins); + IndicesModule indicesModule = new IndicesModule(Collections.emptyList()); MapperRegistry mapperRegistry = indicesModule.getMapperRegistry(); Supplier searchExecutionContextSupplier = () -> { throw new UnsupportedOperationException(); }; MapperService mapperService = mock(MapperService.class); diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java b/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java index ccf8055cd387f..c9cc128d51297 100644 --- a/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java +++ b/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java @@ -19,9 +19,9 @@ import org.elasticsearch.index.mapper.MetadataFieldMapper; import org.elasticsearch.index.mapper.NestedPathFieldMapper; import org.elasticsearch.index.mapper.RoutingFieldMapper; +import org.elasticsearch.index.mapper.RuntimeFieldType; import org.elasticsearch.index.mapper.SeqNoFieldMapper; import org.elasticsearch.index.mapper.SourceFieldMapper; -import org.elasticsearch.index.mapper.TestRuntimeField; import org.elasticsearch.index.mapper.TextFieldMapper; import org.elasticsearch.index.mapper.VersionFieldMapper; import org.elasticsearch.indices.mapper.MapperRegistry; @@ -169,7 +169,12 @@ public Map getMetadataMappers() { } public void testDuplicateRuntimeFieldPlugin() { - TestRuntimeField.Plugin plugin = new TestRuntimeField.Plugin(); + MapperPlugin plugin = new MapperPlugin() { + @Override + public Map getRuntimeFieldTypes() { + return Map.of("test", (name, node, parserContext) -> null); + } + }; List plugins = Arrays.asList(plugin, plugin); IllegalArgumentException e = expectThrows(IllegalArgumentException.class, () -> new IndicesModule(plugins)); From 5140a06fd26255605207367d5e02270aa8d0793e Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Fri, 19 Feb 2021 15:51:05 +0100 Subject: [PATCH 11/16] fix RootObjectMapperTests --- .../index/mapper/RootObjectMapperTests.java | 158 +++++------------- 1 file changed, 39 insertions(+), 119 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/mapper/RootObjectMapperTests.java b/server/src/test/java/org/elasticsearch/index/mapper/RootObjectMapperTests.java index 493b2d012d961..2f646ec60abb7 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/RootObjectMapperTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/RootObjectMapperTests.java @@ -8,7 +8,6 @@ package org.elasticsearch.index.mapper; -import org.apache.lucene.search.Query; import org.elasticsearch.Version; import org.elasticsearch.common.Strings; import org.elasticsearch.common.compress.CompressedXContent; @@ -16,15 +15,13 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.index.mapper.MapperService.MergeReason; -import org.elasticsearch.index.query.SearchExecutionContext; -import org.elasticsearch.plugins.MapperPlugin; -import org.elasticsearch.plugins.Plugin; +import org.elasticsearch.runtimefields.mapper.DoubleScriptFieldType; +import org.elasticsearch.runtimefields.mapper.KeywordScriptFieldType; +import org.elasticsearch.runtimefields.mapper.LongScriptFieldType; import java.io.IOException; import java.util.Arrays; -import java.util.Collection; import java.util.Collections; -import java.util.Map; import static org.elasticsearch.test.VersionUtils.randomVersionBetween; import static org.hamcrest.Matchers.containsString; @@ -363,7 +360,7 @@ public void testIllegalDynamicTemplateUnknownAttributeRuntime() throws Exception mapping.startObject("my_template"); mapping.field("match_mapping_type", "string"); mapping.startObject("runtime"); - mapping.field("type", "test"); + mapping.field("type", "keyword"); mapping.field("foo", "bar"); mapping.endObject(); mapping.endObject(); @@ -376,9 +373,9 @@ public void testIllegalDynamicTemplateUnknownAttributeRuntime() throws Exception MapperParsingException e = expectThrows(MapperParsingException.class, () -> createMapperService(mapping)); assertEquals("Failed to parse mapping: dynamic template [my_template] has invalid content [" + - "{\"match_mapping_type\":\"string\",\"runtime\":{\"foo\":\"bar\",\"type\":\"test\"}}], " + + "{\"match_mapping_type\":\"string\",\"runtime\":{\"foo\":\"bar\",\"type\":\"keyword\"}}], " + "attempted to validate it with the following match_mapping_type: [string]", e.getMessage()); - assertEquals("Unknown mapping attributes [{foo=bar}]", e.getRootCause().getMessage()); + assertEquals("unknown parameter [foo] on mapper [__dynamic__my_template] of type [keyword]", e.getRootCause().getMessage()); } public void testIllegalDynamicTemplateInvalidAttribute() throws Exception { @@ -499,7 +496,7 @@ public void testIllegalDynamicTemplateNoMappingTypeRuntime() throws Exception { assertThat(e.getMessage(), containsString("Failed to parse mapping: dynamic template [my_template] has invalid content [")); assertThat(e.getMessage(), containsString("attempted to validate it with the following match_mapping_type: " + "[string, long, double, boolean, date]")); - assertEquals("Unknown mapping attributes [{foo=bar}]", e.getRootCause().getMessage()); + assertEquals("unknown parameter [foo] on mapper [__dynamic__my_template] of type [date]", e.getRootCause().getMessage()); } public void testIllegalDynamicTemplate7DotXIndex() throws Exception { @@ -530,16 +527,11 @@ public void testIllegalDynamicTemplate7DotXIndex() throws Exception { "last error: [No mapper found for type [string]]"); } - @Override - protected Collection getPlugins() { - return Collections.singletonList(new RuntimeFieldPlugin()); - } - public void testRuntimeSection() throws IOException { String mapping = Strings.toString(runtimeMapping(builder -> { - builder.startObject("field1").field("type", "test").field("prop1", "value1").endObject(); - builder.startObject("field2").field("type", "test").field("prop2", "value2").endObject(); - builder.startObject("field3").field("type", "test").endObject(); + builder.startObject("field1").field("type", "double").endObject(); + builder.startObject("field2").field("type", "date").endObject(); + builder.startObject("field3").field("type", "ip").endObject(); })); MapperService mapperService = createMapperService(mapping); assertEquals(mapping, mapperService.documentMapper().mappingSource().toString()); @@ -550,7 +542,7 @@ public void testRuntimeSectionRejectedUpdate() throws IOException { { XContentBuilder builder = XContentFactory.jsonBuilder().startObject().startObject("_doc"); builder.startObject("runtime"); - builder.startObject("field").field("type", "test").endObject(); + builder.startObject("field").field("type", "long").endObject(); builder.endObject(); builder.startObject("properties"); builder.startObject("concrete").field("type", "keyword").endObject(); @@ -561,12 +553,12 @@ public void testRuntimeSectionRejectedUpdate() throws IOException { MappedFieldType concrete = mapperService.fieldType("concrete"); assertThat(concrete, instanceOf(KeywordFieldMapper.KeywordFieldType.class)); MappedFieldType field = mapperService.fieldType("field"); - assertThat(field, instanceOf(RuntimeField.class)); + assertThat(field, instanceOf(LongScriptFieldType.class)); } { XContentBuilder builder = XContentFactory.jsonBuilder().startObject().startObject("_doc"); builder.startObject("runtime"); - builder.startObject("another_field").field("type", "test").endObject(); + builder.startObject("another_field").field("type", "geo_point").endObject(); builder.endObject(); builder.startObject("properties"); //try changing the type of the existing concrete field, so that merge fails @@ -580,9 +572,9 @@ public void testRuntimeSectionRejectedUpdate() throws IOException { MappedFieldType concrete = mapperService.fieldType("concrete"); assertThat(concrete, instanceOf(KeywordFieldMapper.KeywordFieldType.class)); MappedFieldType field = mapperService.fieldType("field"); - assertThat(field, instanceOf(RuntimeField.class)); + assertThat(field, instanceOf(LongScriptFieldType.class)); assertNull(mapperService.fieldType("another_field")); - assertEquals("{\"_doc\":{\"runtime\":{\"field\":{\"type\":\"test\"}},\"properties\":{\"concrete\":{\"type\":\"keyword\"}}}}", + assertEquals("{\"_doc\":{\"runtime\":{\"field\":{\"type\":\"long\"}},\"properties\":{\"concrete\":{\"type\":\"keyword\"}}}}", Strings.toString(mapperService.documentMapper().mapping().root)); } } @@ -596,53 +588,48 @@ public void testRuntimeSectionMerge() throws IOException { MappedFieldType field = mapperService.fieldType("field"); assertThat(field, instanceOf(KeywordFieldMapper.KeywordFieldType.class)); } + LongScriptFieldType field2; { String mapping = Strings.toString(runtimeMapping(builder -> { - builder.startObject("field").field("type", "test").field("prop1", "first version").endObject(); - builder.startObject("field2").field("type", "test").endObject(); + builder.startObject("field").field("type", "keyword").endObject(); + builder.startObject("field2").field("type", "long").endObject(); })); merge(mapperService, mapping); //field overrides now the concrete field already defined - RuntimeField field = (RuntimeField)mapperService.fieldType("field"); - assertEquals("first version", field.prop1); - assertNull(field.prop2); - RuntimeField field2 = (RuntimeField)mapperService.fieldType("field2"); - assertNull(field2.prop1); - assertNull(field2.prop2); + KeywordScriptFieldType field = (KeywordScriptFieldType)mapperService.fieldType("field"); + assertEquals(KeywordFieldMapper.CONTENT_TYPE, field.typeName()); + field2 = (LongScriptFieldType)mapperService.fieldType("field2"); + assertEquals(NumberFieldMapper.NumberType.LONG.typeName(), field2.typeName()); } { String mapping = Strings.toString(runtimeMapping( //the existing runtime field gets updated - builder -> builder.startObject("field").field("type", "test").field("prop2", "second version").endObject())); + builder -> builder.startObject("field").field("type", "double").endObject())); merge(mapperService, mapping); - RuntimeField field = (RuntimeField)mapperService.fieldType("field"); - assertNull(field.prop1); - assertEquals("second version", field.prop2); - RuntimeField field2 = (RuntimeField)mapperService.fieldType("field2"); - assertNull(field2.prop1); - assertNull(field2.prop2); + DoubleScriptFieldType field = (DoubleScriptFieldType)mapperService.fieldType("field"); + assertEquals(NumberFieldMapper.NumberType.DOUBLE.typeName(), field.typeName()); + LongScriptFieldType field2Updated = (LongScriptFieldType)mapperService.fieldType("field2"); + assertSame(field2, field2Updated); } { String mapping = Strings.toString(mapping(builder -> builder.startObject("concrete").field("type", "keyword").endObject())); merge(mapperService, mapping); - RuntimeField field = (RuntimeField)mapperService.fieldType("field"); - assertNull(field.prop1); - assertEquals("second version", field.prop2); - RuntimeField field2 = (RuntimeField)mapperService.fieldType("field2"); - assertNull(field2.prop1); - assertNull(field2.prop2); + DoubleScriptFieldType field = (DoubleScriptFieldType)mapperService.fieldType("field"); + assertEquals(NumberFieldMapper.NumberType.DOUBLE.typeName(), field.typeName()); + LongScriptFieldType field2Updated = (LongScriptFieldType)mapperService.fieldType("field2"); + assertSame(field2, field2Updated); MappedFieldType concrete = mapperService.fieldType("concrete"); assertThat(concrete, instanceOf(KeywordFieldMapper.KeywordFieldType.class)); } { String mapping = Strings.toString(runtimeMapping( - builder -> builder.startObject("field3").field("type", "test").field("prop1", "value").endObject())); + builder -> builder.startObject("field3").field("type", "date").endObject())); merge(mapperService, mapping); assertEquals("{\"_doc\":" + "{\"runtime\":{" + - "\"field\":{\"type\":\"test\",\"prop2\":\"second version\"}," + - "\"field2\":{\"type\":\"test\"}," + - "\"field3\":{\"type\":\"test\",\"prop1\":\"value\"}}," + + "\"field\":{\"type\":\"double\"}," + + "\"field2\":{\"type\":\"long\"}," + + "\"field3\":{\"type\":\"date\"}}," + "\"properties\":{" + "\"concrete\":{\"type\":\"keyword\"}," + "\"field\":{\"type\":\"keyword\"}}}}", @@ -655,8 +642,8 @@ public void testRuntimeSectionMerge() throws IOException { merge(mapperService, mapping); assertEquals("{\"_doc\":" + "{\"runtime\":{" + - "\"field\":{\"type\":\"test\",\"prop2\":\"second version\"}," + - "\"field2\":{\"type\":\"test\"}}," + + "\"field\":{\"type\":\"double\"}," + + "\"field2\":{\"type\":\"long\"}}," + "\"properties\":{" + "\"concrete\":{\"type\":\"keyword\"}," + "\"field\":{\"type\":\"keyword\"}}}}", @@ -690,75 +677,8 @@ public void testRuntimeSectionWrongFormat() throws IOException { } public void testRuntimeSectionRemainingField() throws IOException { - XContentBuilder mapping = runtimeFieldMapping(builder -> builder.field("type", "test").field("unsupported", "value")); + XContentBuilder mapping = runtimeFieldMapping(builder -> builder.field("type", "keyword").field("unsupported", "value")); MapperParsingException e = expectThrows(MapperParsingException.class, () -> createMapperService(mapping)); - assertEquals("Failed to parse mapping: Mapping definition for [field] has unsupported parameters: " + - "[unsupported : value]", e.getMessage()); - } - - public void testDynamicRuntimeNotSupported() { - { - MapperParsingException e = expectThrows(MapperParsingException.class, - () -> createMapperService(topMapping(b -> b.field("dynamic", "runtime")))); - assertEquals("Failed to parse mapping: unable to set dynamic:runtime as there is no registered dynamic runtime fields builder", - e.getMessage()); - } - { - MapperParsingException e = expectThrows(MapperParsingException.class, - () -> createMapperService(mapping(b -> { - b.startObject("object"); - b.field("type", "object").field("dynamic", "runtime"); - b.endObject(); - }))); - assertEquals("Failed to parse mapping: unable to set dynamic:runtime as there is no registered dynamic runtime fields builder", - e.getMessage()); - } - } - - private static class RuntimeFieldPlugin extends Plugin implements MapperPlugin { - @Override - public Map getRuntimeFieldTypes() { - return Map.of("test", (name, node, parserContext) -> { - Object prop1 = node.remove("prop1"); - Object prop2 = node.remove("prop2"); - return new RuntimeField(name, prop1 == null ? null : prop1.toString(), prop2 == null ? null : prop2.toString()); - }, - "keyword", (name, node, parserContext) -> new TestRuntimeField(name, "keyword"), - "boolean", (name, node, parserContext) -> new TestRuntimeField(name, "boolean"), - "long", (name, node, parserContext) -> new TestRuntimeField(name, "long"), - "double", (name, node, parserContext) -> new TestRuntimeField(name, "double"), - "date", (name, node, parserContext) -> new TestRuntimeField(name, "date")); - } - } - - private static final class RuntimeField extends TestRuntimeField { - private final String prop1; - private final String prop2; - - protected RuntimeField(String name, String prop1, String prop2) { - super(name, "test"); - this.prop1 = prop1; - this.prop2 = prop2; - } - - @Override - public ValueFetcher valueFetcher(SearchExecutionContext context, String format) { - return null; - } - - @Override - public Query termQuery(Object value, SearchExecutionContext context) { - return null; - } - - @Override - protected void doXContentBody(XContentBuilder builder, boolean includeDefaults) throws IOException { - if (prop1 != null) { - builder.field("prop1", prop1); - } - if (prop2 != null) { - builder.field("prop2", prop2); - } - } + assertEquals("Failed to parse mapping: unknown parameter [unsupported] on mapper [field] of type [keyword]", e.getMessage()); } } From 653adecab1939d40a7911d648d43c868cd78153f Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Fri, 19 Feb 2021 20:45:04 +0100 Subject: [PATCH 12/16] update DynamicTemplatesTests --- .../index/mapper/DynamicTemplatesTests.java | 56 ------------------- 1 file changed, 56 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/mapper/DynamicTemplatesTests.java b/server/src/test/java/org/elasticsearch/index/mapper/DynamicTemplatesTests.java index 80e0068d0e60d..0b0603d40469d 100644 --- a/server/src/test/java/org/elasticsearch/index/mapper/DynamicTemplatesTests.java +++ b/server/src/test/java/org/elasticsearch/index/mapper/DynamicTemplatesTests.java @@ -11,11 +11,9 @@ import org.apache.lucene.index.IndexOptions; import org.apache.lucene.index.IndexableField; import org.apache.lucene.util.BytesRef; -import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.mapper.ParseContext.Document; import static org.elasticsearch.test.StreamsUtils.copyToStringFromClasspath; -import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.notNullValue; @@ -52,60 +50,6 @@ public void testMatchTypeOnly() throws Exception { assertTrue(mapperService.fieldType("l").isSearchable()); } - public void testMatchTypeRuntimeNoPlugin() throws Exception { - XContentBuilder topMapping = topMapping(b -> { - b.startArray("dynamic_templates"); - { - b.startObject(); - { - b.startObject("test"); - { - b.field("match_mapping_type", "string"); - b.startObject("runtime").endObject(); - } - b.endObject(); - } - b.endObject(); - } - b.endArray(); - }); - - MapperParsingException e = expectThrows(MapperParsingException.class, () -> createMapperService(topMapping)); - assertEquals("Failed to parse mapping: dynamic template [test] has invalid content [" + - "{\"match_mapping_type\":\"string\",\"runtime\":{}}], " + - "attempted to validate it with the following match_mapping_type: [string]", e.getMessage()); - assertEquals("No runtime field found for type [keyword]", e.getRootCause().getMessage()); - } - - public void testMatchAllTypesRuntimeNoPlugin() throws Exception { - XContentBuilder topMapping = topMapping(b -> { - b.startArray("dynamic_templates"); - { - b.startObject(); - { - b.startObject("test"); - { - if (randomBoolean()) { - b.field("match_mapping_type", "*"); - } else { - b.field("match", "field"); - } - b.startObject("runtime").endObject(); - } - b.endObject(); - } - b.endObject(); - } - b.endArray(); - }); - - MapperParsingException e = expectThrows(MapperParsingException.class, () -> createMapperService(topMapping)); - assertThat(e.getMessage(), containsString("Failed to parse mapping: dynamic template [test] has invalid content [")); - assertThat(e.getMessage(), containsString("attempted to validate it with the following match_mapping_type: " + - "[string, long, double, boolean, date]")); - assertEquals("No runtime field found for type [date]", e.getRootCause().getMessage()); - } - public void testSimple() throws Exception { String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/dynamictemplate/simple/test-mapping.json"); MapperService mapperService = createMapperService(mapping); From 4ba607594aea3276b6d3e0bf69a3a3d4d084660f Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Fri, 19 Feb 2021 20:45:35 +0100 Subject: [PATCH 13/16] address ScriptServiceTests, update MockScriptEngine with newly added contexts --- .../script/MockScriptEngine.java | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java b/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java index 243ef4633af74..995f18232b49d 100644 --- a/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java +++ b/test/framework/src/main/java/org/elasticsearch/script/MockScriptEngine.java @@ -15,6 +15,13 @@ import org.elasticsearch.index.similarity.ScriptedSimilarity.Field; import org.elasticsearch.index.similarity.ScriptedSimilarity.Query; import org.elasticsearch.index.similarity.ScriptedSimilarity.Term; +import org.elasticsearch.runtimefields.mapper.BooleanFieldScript; +import org.elasticsearch.runtimefields.mapper.DateFieldScript; +import org.elasticsearch.runtimefields.mapper.DoubleFieldScript; +import org.elasticsearch.runtimefields.mapper.GeoPointFieldScript; +import org.elasticsearch.runtimefields.mapper.IpFieldScript; +import org.elasticsearch.runtimefields.mapper.LongFieldScript; +import org.elasticsearch.runtimefields.mapper.StringFieldScript; import org.elasticsearch.search.aggregations.pipeline.MovingFunctionScript; import org.elasticsearch.search.lookup.LeafSearchLookup; import org.elasticsearch.search.lookup.SearchLookup; @@ -231,6 +238,62 @@ public double execute(Map params1, double[] values) { } else if (context.instanceClazz.equals(IntervalFilterScript.class)) { IntervalFilterScript.Factory factory = mockCompiled::createIntervalFilterScript; return context.factoryClazz.cast(factory); + } else if (context.instanceClazz.equals(BooleanFieldScript.class)) { + BooleanFieldScript.Factory booleanFieldScript = (f, p, s) -> ctx -> new BooleanFieldScript(f, p, s, ctx) { + @Override + public void execute() { + emit(true); + } + }; + return context.factoryClazz.cast(booleanFieldScript); + } else if (context.instanceClazz.equals(StringFieldScript.class)) { + StringFieldScript.Factory stringFieldScript = (f, p, s) -> ctx -> new StringFieldScript(f, p, s, ctx) { + @Override + public void execute() { + emit("test"); + } + }; + return context.factoryClazz.cast(stringFieldScript); + } else if (context.instanceClazz.equals(LongFieldScript.class)) { + LongFieldScript.Factory longFieldScript = (f, p, s) -> ctx -> new LongFieldScript(f, p, s, ctx) { + @Override + public void execute() { + emit(1L); + } + }; + return context.factoryClazz.cast(longFieldScript); + } else if (context.instanceClazz.equals(DoubleFieldScript.class)) { + DoubleFieldScript.Factory doubleFieldScript = (f, p, s) -> ctx -> new DoubleFieldScript(f, p, s, ctx) { + @Override + public void execute() { + emit(1.2D); + } + }; + return context.factoryClazz.cast(doubleFieldScript); + } else if (context.instanceClazz.equals(DateFieldScript.class)) { + DateFieldScript.Factory dateFieldScript = (f, p, s, formatter) -> ctx -> new DateFieldScript(f, p, s, formatter, ctx) { + @Override + public void execute() { + emit(123L); + } + }; + return context.factoryClazz.cast(dateFieldScript); + } else if (context.instanceClazz.equals(IpFieldScript.class)) { + IpFieldScript.Factory ipFieldScript = (f, p, s) -> ctx -> new IpFieldScript(f, p, s, ctx) { + @Override + public void execute() { + emit("127.0.0.1"); + } + }; + return context.factoryClazz.cast(ipFieldScript); + } else if (context.instanceClazz.equals(GeoPointFieldScript.class)) { + GeoPointFieldScript.Factory geoPointFieldScript = (f, p, s) -> ctx -> new GeoPointFieldScript(f, p, s, ctx) { + @Override + public void execute() { + emit(1.2D, 1.2D); + } + }; + return context.factoryClazz.cast(geoPointFieldScript); } ContextCompiler compiler = contexts.get(context); if (compiler != null) { From fd4df640cc82064f7586656366ac2f452ba521a3 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Fri, 19 Feb 2021 20:46:59 +0100 Subject: [PATCH 14/16] spotless --- .../runtimefields/mapper/RuntimeFieldsPainlessExtension.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java index f7c4c1474e744..b31767b1d3ad2 100644 --- a/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java +++ b/x-pack/plugin/runtime-fields/src/main/java/org/elasticsearch/xpack/runtimefields/mapper/RuntimeFieldsPainlessExtension.java @@ -30,8 +30,7 @@ public class RuntimeFieldsPainlessExtension implements PainlessExtension { private final List whitelists; public RuntimeFieldsPainlessExtension(RuntimeFields plugin) { - Whitelist commonWhitelist = WhitelistLoader.loadFromResourceFiles( - RuntimeFieldsPainlessExtension.class, "common_whitelist.txt"); + Whitelist commonWhitelist = WhitelistLoader.loadFromResourceFiles(RuntimeFieldsPainlessExtension.class, "common_whitelist.txt"); Whitelist grokWhitelist = new Whitelist( commonWhitelist.classLoader, List.of(), From b8b01bd9704b8523a2dda56dd914b91adaa65a54 Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Fri, 19 Feb 2021 22:21:43 +0100 Subject: [PATCH 15/16] testing conventions --- x-pack/plugin/runtime-fields/build.gradle | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x-pack/plugin/runtime-fields/build.gradle b/x-pack/plugin/runtime-fields/build.gradle index 928061c231174..0bb1b30ab4f59 100644 --- a/x-pack/plugin/runtime-fields/build.gradle +++ b/x-pack/plugin/runtime-fields/build.gradle @@ -19,3 +19,6 @@ dependencies { tasks.named("dependencyLicenses").configure { ignoreSha 'x-pack-core' } + +//this plugin is here only for the painless extension, there are no unit tests +tasks.named("testingConventions").configure { enabled = false } From a52860dbc46aab58559333386a1fa48c429e897c Mon Sep 17 00:00:00 2001 From: Luca Cavanna Date: Mon, 22 Feb 2021 09:26:24 +0100 Subject: [PATCH 16/16] add test --- .../elasticsearch/indices/IndicesModuleTests.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java b/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java index c9cc128d51297..60e457ea29410 100644 --- a/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java +++ b/server/src/test/java/org/elasticsearch/indices/IndicesModuleTests.java @@ -14,6 +14,7 @@ import org.elasticsearch.index.mapper.IdFieldMapper; import org.elasticsearch.index.mapper.IgnoredFieldMapper; import org.elasticsearch.index.mapper.IndexFieldMapper; +import org.elasticsearch.index.mapper.KeywordFieldMapper; import org.elasticsearch.index.mapper.Mapper; import org.elasticsearch.index.mapper.MapperParsingException; import org.elasticsearch.index.mapper.MetadataFieldMapper; @@ -181,6 +182,19 @@ public Map getRuntimeFieldTypes() { assertThat(e.getMessage(), containsString("already registered")); } + public void testRuntimeFieldPluginWithBuiltinFieldType() { + MapperPlugin plugin = new MapperPlugin() { + @Override + public Map getRuntimeFieldTypes() { + return Map.of(KeywordFieldMapper.CONTENT_TYPE, (name, node, parserContext) -> null); + } + }; + List plugins = Collections.singletonList(plugin); + IllegalArgumentException e = expectThrows(IllegalArgumentException.class, + () -> new IndicesModule(plugins)); + assertThat(e.getMessage(), containsString("already registered")); + } + public void testDuplicateFieldNamesMapper() { List plugins = Arrays.asList(new MapperPlugin() { @Override