diff --git a/modules/mapper-extras/build.gradle b/modules/mapper-extras/build.gradle index d63df5a685931..e9d0a80a18c0b 100644 --- a/modules/mapper-extras/build.gradle +++ b/modules/mapper-extras/build.gradle @@ -11,7 +11,7 @@ apply plugin: 'elasticsearch.internal-cluster-test' esplugin { description 'Adds advanced field mappers' - classname 'org.elasticsearch.index.mapper.MapperExtrasPlugin' + classname 'org.elasticsearch.index.mapper.extras.MapperExtrasPlugin' } restResources { @@ -19,19 +19,3 @@ restResources { include '_common', 'cluster', 'field_caps', 'nodes', 'indices', 'index', 'search', 'get' } } - -tasks.named('splitPackagesAudit').configure { - // index is owned by server, move these to mapper specific packages - ignoreClasses 'org.elasticsearch.index.query.RankFeatureQueryBuilder', - 'org.elasticsearch.index.query.RankFeatureQueryBuilders', - 'org.elasticsearch.index.query.SourceConfirmedTextQuery', - 'org.elasticsearch.index.query.SourceIntervalsSource', - 'org.elasticsearch.index.mapper.MapperExtrasPlugin', - 'org.elasticsearch.index.mapper.MatchOnlyTextFieldMapper', - 'org.elasticsearch.index.mapper.RankFeatureFieldMapper', - 'org.elasticsearch.index.mapper.RankFeatureMetaFieldMapper', - 'org.elasticsearch.index.mapper.RankFeaturesFieldMapper', - 'org.elasticsearch.index.mapper.ScaledFloatFieldMapper', - 'org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper', - 'org.elasticsearch.index.mapper.TokenCountFieldMapper' -} diff --git a/modules/mapper-extras/src/internalClusterTest/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldMapperTests.java b/modules/mapper-extras/src/internalClusterTest/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldMapperTests.java index 617dae6b05065..749107ad205b9 100644 --- a/modules/mapper-extras/src/internalClusterTest/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldMapperTests.java +++ b/modules/mapper-extras/src/internalClusterTest/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldMapperTests.java @@ -18,6 +18,8 @@ import org.elasticsearch.common.Strings; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; +import org.elasticsearch.index.mapper.extras.MatchOnlyTextFieldMapper; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.Plugin; import org.hamcrest.Matchers; diff --git a/modules/mapper-extras/src/internalClusterTest/java/org/elasticsearch/index/mapper/TokenCountFieldMapperIntegrationIT.java b/modules/mapper-extras/src/internalClusterTest/java/org/elasticsearch/index/mapper/TokenCountFieldMapperIntegrationIT.java index 3ece2372e650d..0cd82c0ba6257 100644 --- a/modules/mapper-extras/src/internalClusterTest/java/org/elasticsearch/index/mapper/TokenCountFieldMapperIntegrationIT.java +++ b/modules/mapper-extras/src/internalClusterTest/java/org/elasticsearch/index/mapper/TokenCountFieldMapperIntegrationIT.java @@ -17,6 +17,7 @@ import org.elasticsearch.action.search.SearchRequestBuilder; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.search.SearchHit; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/MapperExtrasPlugin.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MapperExtrasPlugin.java similarity index 95% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/MapperExtrasPlugin.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MapperExtrasPlugin.java index 2ea69007be8f2..dbe22d474c502 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/MapperExtrasPlugin.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MapperExtrasPlugin.java @@ -6,10 +6,10 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; +import org.elasticsearch.index.mapper.Mapper; import org.elasticsearch.index.mapper.MetadataFieldMapper.TypeParser; -import org.elasticsearch.index.query.RankFeatureQueryBuilder; import org.elasticsearch.plugins.MapperPlugin; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.plugins.SearchPlugin; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldMapper.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java similarity index 95% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldMapper.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java index e01d08bacaf6f..b9f2a5ad9b506 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldMapper.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldMapper.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; @@ -32,10 +32,17 @@ import org.elasticsearch.index.analysis.IndexAnalyzers; import org.elasticsearch.index.analysis.NamedAnalyzer; import org.elasticsearch.index.fielddata.IndexFieldData; +import org.elasticsearch.index.mapper.DocumentParserContext; +import org.elasticsearch.index.mapper.FieldMapper; +import org.elasticsearch.index.mapper.MapperBuilderContext; +import org.elasticsearch.index.mapper.SourceValueFetcher; +import org.elasticsearch.index.mapper.StringFieldType; +import org.elasticsearch.index.mapper.TextFieldMapper; import org.elasticsearch.index.mapper.TextFieldMapper.TextFieldType; +import org.elasticsearch.index.mapper.TextParams; +import org.elasticsearch.index.mapper.TextSearchInfo; +import org.elasticsearch.index.mapper.ValueFetcher; import org.elasticsearch.index.query.SearchExecutionContext; -import org.elasticsearch.index.query.SourceConfirmedTextQuery; -import org.elasticsearch.index.query.SourceIntervalsSource; import org.elasticsearch.search.lookup.SearchLookup; import org.elasticsearch.search.lookup.SourceLookup; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeatureFieldMapper.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldMapper.java similarity index 93% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeatureFieldMapper.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldMapper.java index 8a0847df9b1e6..0859f3335fedb 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeatureFieldMapper.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldMapper.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.FeatureField; import org.apache.lucene.document.FieldType; @@ -17,6 +17,13 @@ import org.elasticsearch.common.lucene.Lucene; import org.elasticsearch.common.xcontent.XContentParser.Token; import org.elasticsearch.index.fielddata.IndexFieldData; +import org.elasticsearch.index.mapper.DocumentParserContext; +import org.elasticsearch.index.mapper.FieldMapper; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperBuilderContext; +import org.elasticsearch.index.mapper.SourceValueFetcher; +import org.elasticsearch.index.mapper.TextSearchInfo; +import org.elasticsearch.index.mapper.ValueFetcher; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.search.lookup.SearchLookup; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeatureMetaFieldMapper.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureMetaFieldMapper.java similarity index 89% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeatureMetaFieldMapper.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureMetaFieldMapper.java index 1fbbfa2ec1fd7..b47370fe0e487 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeatureMetaFieldMapper.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureMetaFieldMapper.java @@ -6,9 +6,13 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.search.Query; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MetadataFieldMapper; +import org.elasticsearch.index.mapper.TextSearchInfo; +import org.elasticsearch.index.mapper.ValueFetcher; import org.elasticsearch.index.query.SearchExecutionContext; import java.util.Collections; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/query/RankFeatureQueryBuilder.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilder.java similarity index 97% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/query/RankFeatureQueryBuilder.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilder.java index e7a524a2c6168..edd132f0a0433 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/query/RankFeatureQueryBuilder.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilder.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.query; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.FeatureField; import org.apache.lucene.search.MatchNoDocsQuery; @@ -18,9 +18,10 @@ import org.elasticsearch.common.xcontent.ObjectParser; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.index.mapper.MappedFieldType; -import org.elasticsearch.index.mapper.RankFeatureFieldMapper.RankFeatureFieldType; -import org.elasticsearch.index.mapper.RankFeatureMetaFieldMapper; -import org.elasticsearch.index.mapper.RankFeaturesFieldMapper.RankFeaturesFieldType; +import org.elasticsearch.index.mapper.extras.RankFeatureFieldMapper.RankFeatureFieldType; +import org.elasticsearch.index.mapper.extras.RankFeaturesFieldMapper.RankFeaturesFieldType; +import org.elasticsearch.index.query.AbstractQueryBuilder; +import org.elasticsearch.index.query.SearchExecutionContext; import java.io.IOException; import java.util.Arrays; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/query/RankFeatureQueryBuilders.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilders.java similarity index 98% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/query/RankFeatureQueryBuilders.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilders.java index 2d094d2187b01..649685667b2fe 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/query/RankFeatureQueryBuilders.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilders.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.query; +package org.elasticsearch.index.mapper.extras; public final class RankFeatureQueryBuilders { private RankFeatureQueryBuilders() {} diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeaturesFieldMapper.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldMapper.java similarity index 93% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeaturesFieldMapper.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldMapper.java index 1897e9583bce2..0282dc2808ed8 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/RankFeaturesFieldMapper.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldMapper.java @@ -6,13 +6,20 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.FeatureField; import org.apache.lucene.search.Query; import org.elasticsearch.common.lucene.Lucene; import org.elasticsearch.common.xcontent.XContentParser.Token; import org.elasticsearch.index.fielddata.IndexFieldData; +import org.elasticsearch.index.mapper.DocumentParserContext; +import org.elasticsearch.index.mapper.FieldMapper; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperBuilderContext; +import org.elasticsearch.index.mapper.SourceValueFetcher; +import org.elasticsearch.index.mapper.TextSearchInfo; +import org.elasticsearch.index.mapper.ValueFetcher; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.search.lookup.SearchLookup; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/ScaledFloatFieldMapper.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldMapper.java similarity index 97% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/ScaledFloatFieldMapper.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldMapper.java index ee217251f2983..5c5f630f069f2 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/ScaledFloatFieldMapper.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldMapper.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.Field; import org.apache.lucene.index.DocValues; @@ -31,6 +31,14 @@ import org.elasticsearch.index.fielddata.SortedBinaryDocValues; import org.elasticsearch.index.fielddata.SortedNumericDoubleValues; import org.elasticsearch.index.fielddata.plain.SortedNumericIndexFieldData; +import org.elasticsearch.index.mapper.DocumentParserContext; +import org.elasticsearch.index.mapper.FieldMapper; +import org.elasticsearch.index.mapper.MapperBuilderContext; +import org.elasticsearch.index.mapper.NumberFieldMapper; +import org.elasticsearch.index.mapper.SimpleMappedFieldType; +import org.elasticsearch.index.mapper.SourceValueFetcher; +import org.elasticsearch.index.mapper.TextSearchInfo; +import org.elasticsearch.index.mapper.ValueFetcher; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.search.DocValueFormat; import org.elasticsearch.search.aggregations.support.ValuesSourceType; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapper.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldMapper.java similarity index 98% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapper.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldMapper.java index 96f8c7740d10f..3bca06abc2e59 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapper.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldMapper.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.AnalyzerWrapper; @@ -39,6 +39,17 @@ import org.elasticsearch.index.analysis.AnalyzerScope; import org.elasticsearch.index.analysis.IndexAnalyzers; import org.elasticsearch.index.analysis.NamedAnalyzer; +import org.elasticsearch.index.mapper.DocumentParserContext; +import org.elasticsearch.index.mapper.FieldMapper; +import org.elasticsearch.index.mapper.Mapper; +import org.elasticsearch.index.mapper.MapperBuilderContext; +import org.elasticsearch.index.mapper.MapperParsingException; +import org.elasticsearch.index.mapper.SourceValueFetcher; +import org.elasticsearch.index.mapper.StringFieldType; +import org.elasticsearch.index.mapper.TextFieldMapper; +import org.elasticsearch.index.mapper.TextParams; +import org.elasticsearch.index.mapper.TextSearchInfo; +import org.elasticsearch.index.mapper.ValueFetcher; import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.index.similarity.SimilarityProvider; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/query/SourceConfirmedTextQuery.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SourceConfirmedTextQuery.java similarity index 99% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/query/SourceConfirmedTextQuery.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SourceConfirmedTextQuery.java index 180d5c7faf73a..51ad57b7f26e4 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/query/SourceConfirmedTextQuery.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SourceConfirmedTextQuery.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.query; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.index.FieldInvertState; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/query/SourceIntervalsSource.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SourceIntervalsSource.java similarity index 99% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/query/SourceIntervalsSource.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SourceIntervalsSource.java index aa98574abe240..88adbcfe34570 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/query/SourceIntervalsSource.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/SourceIntervalsSource.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.query; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.index.LeafReaderContext; diff --git a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/TokenCountFieldMapper.java b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/TokenCountFieldMapper.java similarity index 93% rename from modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/TokenCountFieldMapper.java rename to modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/TokenCountFieldMapper.java index 1f428317153b0..385fcc7973ec4 100644 --- a/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/TokenCountFieldMapper.java +++ b/modules/mapper-extras/src/main/java/org/elasticsearch/index/mapper/extras/TokenCountFieldMapper.java @@ -6,12 +6,20 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; import org.elasticsearch.index.analysis.NamedAnalyzer; +import org.elasticsearch.index.mapper.DocValueFetcher; +import org.elasticsearch.index.mapper.DocumentParserContext; +import org.elasticsearch.index.mapper.FieldMapper; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperBuilderContext; +import org.elasticsearch.index.mapper.MapperParsingException; +import org.elasticsearch.index.mapper.NumberFieldMapper; +import org.elasticsearch.index.mapper.ValueFetcher; import org.elasticsearch.index.query.SearchExecutionContext; import java.io.IOException; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/BWCTemplateTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/BWCTemplateTests.java similarity index 89% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/BWCTemplateTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/BWCTemplateTests.java index f13205faa053a..8a9bf17a3a3a4 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/BWCTemplateTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/BWCTemplateTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.elasticsearch.common.xcontent.XContentType; import org.elasticsearch.plugins.Plugin; @@ -27,9 +27,9 @@ protected Collection> getPlugins() { } public void testBeatsTemplatesBWC() throws Exception { - byte[] metricBeat = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/metricbeat-6.0.template.json"); - byte[] packetBeat = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/packetbeat-6.0.template.json"); - byte[] fileBeat = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/filebeat-6.0.template.json"); + byte[] metricBeat = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/extras/metricbeat-6.0.template.json"); + byte[] packetBeat = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/extras/packetbeat-6.0.template.json"); + byte[] fileBeat = copyToBytesFromClasspath("/org/elasticsearch/index/mapper/extras/filebeat-6.0.template.json"); client().admin().indices().preparePutTemplate("metricbeat").setSource(metricBeat, XContentType.JSON).get(); client().admin().indices().preparePutTemplate("packetbeat").setSource(packetBeat, XContentType.JSON).get(); client().admin().indices().preparePutTemplate("filebeat").setSource(fileBeat, XContentType.JSON).get(); diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldTypeTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldTypeTests.java similarity index 95% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldTypeTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldTypeTests.java index 8c3cd70c8af27..a5cd66bba5229 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/MatchOnlyTextFieldTypeTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/MatchOnlyTextFieldTypeTests.java @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.CannedTokenStream; import org.apache.lucene.analysis.Token; @@ -29,9 +29,11 @@ import org.elasticsearch.common.lucene.search.AutomatonQueries; import org.elasticsearch.common.lucene.search.MultiPhrasePrefixQuery; import org.elasticsearch.common.unit.Fuzziness; -import org.elasticsearch.index.mapper.MatchOnlyTextFieldMapper.MatchOnlyTextFieldType; -import org.elasticsearch.index.query.SourceConfirmedTextQuery; -import org.elasticsearch.index.query.SourceIntervalsSource; +import org.elasticsearch.index.mapper.FieldTypeTestCase; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.extras.MatchOnlyTextFieldMapper.MatchOnlyTextFieldType; +import org.elasticsearch.index.mapper.extras.SourceConfirmedTextQuery; +import org.elasticsearch.index.mapper.extras.SourceIntervalsSource; import org.hamcrest.Matchers; import java.io.IOException; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureFieldMapperTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldMapperTests.java similarity index 93% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureFieldMapperTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldMapperTests.java index bb04cc1d3e200..88f6d6e2d4348 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureFieldMapperTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldMapperTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.tokenattributes.TermFrequencyAttribute; @@ -16,6 +16,13 @@ import org.apache.lucene.search.TermQuery; import org.elasticsearch.common.Strings; import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.index.mapper.DocumentMapper; +import org.elasticsearch.index.mapper.LuceneDocument; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperParsingException; +import org.elasticsearch.index.mapper.MapperTestCase; +import org.elasticsearch.index.mapper.ParsedDocument; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; import org.elasticsearch.plugins.Plugin; import java.io.IOException; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureFieldTypeTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldTypeTests.java similarity index 78% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureFieldTypeTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldTypeTests.java index 92869ccc68513..1a8cf5e721339 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureFieldTypeTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureFieldTypeTests.java @@ -6,7 +6,12 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; + +import org.elasticsearch.index.mapper.FieldTypeTestCase; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperBuilderContext; +import org.elasticsearch.index.mapper.extras.RankFeatureFieldMapper; import java.io.IOException; import java.util.Collections; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureMetaFieldMapperTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureMetaFieldMapperTests.java similarity index 86% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureMetaFieldMapperTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureMetaFieldMapperTests.java index 476d257799f34..6ad3e225752c4 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeatureMetaFieldMapperTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureMetaFieldMapperTests.java @@ -6,13 +6,20 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.elasticsearch.common.Strings; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.compress.CompressedXContent; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.index.mapper.DocumentMapper; +import org.elasticsearch.index.mapper.MapperParsingException; +import org.elasticsearch.index.mapper.MapperService; +import org.elasticsearch.index.mapper.Mapping; +import org.elasticsearch.index.mapper.SourceToParse; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; +import org.elasticsearch.index.mapper.extras.RankFeatureMetaFieldMapper; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.ESSingleNodeTestCase; import org.hamcrest.CoreMatchers; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/query/RankFeatureQueryBuilderTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilderTests.java similarity index 94% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/query/RankFeatureQueryBuilderTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilderTests.java index 024293c661519..02d5a619f93d9 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/query/RankFeatureQueryBuilderTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeatureQueryBuilderTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.query; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.FeatureField; import org.apache.lucene.search.MatchNoDocsQuery; @@ -14,9 +14,11 @@ import org.elasticsearch.action.admin.indices.mapping.put.PutMappingRequest; import org.elasticsearch.common.Strings; import org.elasticsearch.common.compress.CompressedXContent; -import org.elasticsearch.index.mapper.MapperExtrasPlugin; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; import org.elasticsearch.index.mapper.MapperService; -import org.elasticsearch.index.query.RankFeatureQueryBuilder.ScoreFunction; +import org.elasticsearch.index.mapper.extras.RankFeatureQueryBuilder; +import org.elasticsearch.index.mapper.extras.RankFeatureQueryBuilder.ScoreFunction; +import org.elasticsearch.index.query.SearchExecutionContext; import org.elasticsearch.plugins.Plugin; import org.elasticsearch.test.AbstractQueryTestCase; import org.elasticsearch.test.TestGeoShapeFieldMapperPlugin; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeaturesFieldMapperTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldMapperTests.java similarity index 94% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeaturesFieldMapperTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldMapperTests.java index 1b932d548daa7..e06548e61e4ef 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeaturesFieldMapperTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldMapperTests.java @@ -6,12 +6,18 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.FeatureField; import org.apache.lucene.index.IndexableField; import org.elasticsearch.common.Strings; import org.elasticsearch.common.xcontent.XContentBuilder; +import org.elasticsearch.index.mapper.DocumentMapper; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperParsingException; +import org.elasticsearch.index.mapper.MapperService; +import org.elasticsearch.index.mapper.MapperTestCase; +import org.elasticsearch.index.mapper.ParsedDocument; import org.elasticsearch.plugins.Plugin; import org.hamcrest.Matchers; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeaturesFieldTypeTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldTypeTests.java similarity index 74% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeaturesFieldTypeTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldTypeTests.java index 595f4827afc5a..6ac2c1133a553 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/RankFeaturesFieldTypeTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/RankFeaturesFieldTypeTests.java @@ -6,7 +6,11 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; + +import org.elasticsearch.index.mapper.FieldTypeTestCase; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.extras.RankFeaturesFieldMapper; import java.util.Collections; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/ScaledFloatFieldMapperTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldMapperTests.java similarity index 95% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/ScaledFloatFieldMapperTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldMapperTests.java index 39fd6333b1dbd..79a68c37f924c 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/ScaledFloatFieldMapperTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldMapperTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.index.DocValuesType; import org.apache.lucene.index.IndexableField; @@ -15,6 +15,15 @@ import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; +import org.elasticsearch.index.mapper.DocumentMapper; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperParsingException; +import org.elasticsearch.index.mapper.MapperService; +import org.elasticsearch.index.mapper.MapperTestCase; +import org.elasticsearch.index.mapper.ParsedDocument; +import org.elasticsearch.index.mapper.SourceToParse; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; +import org.elasticsearch.index.mapper.extras.ScaledFloatFieldMapper; import org.elasticsearch.plugins.Plugin; import java.io.IOException; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/ScaledFloatFieldTypeTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldTypeTests.java similarity index 96% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/ScaledFloatFieldTypeTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldTypeTests.java index 4e4ee69fe3c29..3e435f632283d 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/ScaledFloatFieldTypeTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/ScaledFloatFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.Document; import org.apache.lucene.document.DoublePoint; @@ -22,6 +22,11 @@ import org.elasticsearch.index.fielddata.IndexNumericFieldData; import org.elasticsearch.index.fielddata.LeafNumericFieldData; import org.elasticsearch.index.fielddata.SortedNumericDoubleValues; +import org.elasticsearch.index.mapper.FieldTypeTestCase; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperBuilderContext; +import org.elasticsearch.index.mapper.NumberFieldMapper; +import org.elasticsearch.index.mapper.extras.ScaledFloatFieldMapper; import java.io.IOException; import java.util.Arrays; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeAnalyzerTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeAnalyzerTests.java similarity index 98% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeAnalyzerTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeAnalyzerTests.java index e68be0c4b0dab..4b5833b8f7a80 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeAnalyzerTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeAnalyzerTests.java @@ -6,13 +6,13 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.TokenStream; import org.apache.lucene.analysis.core.SimpleAnalyzer; import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.SearchAsYouTypeAnalyzer; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.SearchAsYouTypeAnalyzer; import org.elasticsearch.test.ESTestCase; import java.io.IOException; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapperTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldMapperTests.java similarity index 96% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapperTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldMapperTests.java index 289b659db7996..a37bc0a14590a 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldMapperTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldMapperTests.java @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.core.KeywordAnalyzer; import org.apache.lucene.analysis.core.SimpleAnalyzer; @@ -35,12 +35,21 @@ import org.elasticsearch.index.analysis.AnalyzerScope; import org.elasticsearch.index.analysis.IndexAnalyzers; import org.elasticsearch.index.analysis.NamedAnalyzer; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.PrefixFieldMapper; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.PrefixFieldType; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.SearchAsYouTypeAnalyzer; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.SearchAsYouTypeFieldType; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.ShingleFieldMapper; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.ShingleFieldType; +import org.elasticsearch.index.mapper.DocumentMapper; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.Mapper; +import org.elasticsearch.index.mapper.MapperService; +import org.elasticsearch.index.mapper.MapperTestCase; +import org.elasticsearch.index.mapper.ParsedDocument; +import org.elasticsearch.index.mapper.TextFieldMapper; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.PrefixFieldMapper; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.PrefixFieldType; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.SearchAsYouTypeAnalyzer; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.SearchAsYouTypeFieldType; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.ShingleFieldMapper; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.ShingleFieldType; import org.elasticsearch.index.query.MatchPhrasePrefixQueryBuilder; import org.elasticsearch.index.query.MatchPhraseQueryBuilder; import org.elasticsearch.index.query.MultiMatchQueryBuilder; @@ -655,13 +664,13 @@ private static void assertRootFieldMapper(SearchAsYouTypeFieldMapper mapper, assertThat(mapper.prefixField(), notNullValue()); assertThat(mapper.prefixField().fieldType().parentField, equalTo(mapper.name())); - assertPrefixFieldType(mapper.prefixField(), mapper.indexAnalyzers, maxShingleSize, analyzerName); + assertPrefixFieldType(mapper.prefixField(), mapper.indexAnalyzers(), maxShingleSize, analyzerName); for (int shingleSize = 2; shingleSize <= maxShingleSize; shingleSize++) { final ShingleFieldMapper shingleFieldMapper = mapper.shingleFields()[shingleSize - 2]; assertThat(shingleFieldMapper, notNullValue()); - assertShingleFieldType(shingleFieldMapper, mapper.indexAnalyzers, shingleSize, + assertShingleFieldType(shingleFieldMapper, mapper.indexAnalyzers(), shingleSize, analyzerName, mapper.prefixField().fieldType()); } diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldTypeTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldTypeTests.java similarity index 90% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldTypeTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldTypeTests.java index 68aae9a07e6a6..61c034f8c2879 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/SearchAsYouTypeFieldTypeTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SearchAsYouTypeFieldTypeTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.FieldType; import org.apache.lucene.index.IndexOptions; @@ -18,10 +18,14 @@ import org.apache.lucene.util.BytesRef; import org.elasticsearch.ElasticsearchException; import org.elasticsearch.common.lucene.Lucene; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.Defaults; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.PrefixFieldType; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.SearchAsYouTypeFieldType; -import org.elasticsearch.index.mapper.SearchAsYouTypeFieldMapper.ShingleFieldType; +import org.elasticsearch.index.mapper.FieldTypeTestCase; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.TextSearchInfo; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.Defaults; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.PrefixFieldType; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.SearchAsYouTypeFieldType; +import org.elasticsearch.index.mapper.extras.SearchAsYouTypeFieldMapper.ShingleFieldType; import java.io.IOException; import java.util.Collections; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/query/SourceConfirmedTextQueryTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SourceConfirmedTextQueryTests.java similarity index 99% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/query/SourceConfirmedTextQueryTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SourceConfirmedTextQueryTests.java index c0d1b12f61f54..4d20ecc32b2ca 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/query/SourceConfirmedTextQueryTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SourceConfirmedTextQueryTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.query; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field.Store; @@ -34,6 +34,7 @@ import org.elasticsearch.common.CheckedIntFunction; import org.elasticsearch.common.lucene.Lucene; import org.elasticsearch.common.lucene.search.MultiPhrasePrefixQuery; +import org.elasticsearch.index.mapper.extras.SourceConfirmedTextQuery; import org.elasticsearch.test.ESTestCase; import java.io.IOException; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/query/SourceIntervalsSourceTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SourceIntervalsSourceTests.java similarity index 98% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/query/SourceIntervalsSourceTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SourceIntervalsSourceTests.java index 3f49120100a7d..def6afe0c835d 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/query/SourceIntervalsSourceTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/SourceIntervalsSourceTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.query; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.document.Document; import org.apache.lucene.document.Field; @@ -30,6 +30,7 @@ import org.apache.lucene.util.BytesRef; import org.elasticsearch.common.CheckedIntFunction; import org.elasticsearch.common.lucene.Lucene; +import org.elasticsearch.index.mapper.extras.SourceIntervalsSource; import org.elasticsearch.test.ESTestCase; import java.io.IOException; diff --git a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/TokenCountFieldMapperTests.java b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/TokenCountFieldMapperTests.java similarity index 94% rename from modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/TokenCountFieldMapperTests.java rename to modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/TokenCountFieldMapperTests.java index ae9a1e9941a0f..c735302eac14c 100644 --- a/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/TokenCountFieldMapperTests.java +++ b/modules/mapper-extras/src/test/java/org/elasticsearch/index/mapper/extras/TokenCountFieldMapperTests.java @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -package org.elasticsearch.index.mapper; +package org.elasticsearch.index.mapper.extras; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.CannedTokenStream; @@ -20,6 +20,13 @@ import org.elasticsearch.index.analysis.AnalyzerScope; import org.elasticsearch.index.analysis.IndexAnalyzers; import org.elasticsearch.index.analysis.NamedAnalyzer; +import org.elasticsearch.index.mapper.DocumentMapper; +import org.elasticsearch.index.mapper.LuceneDocument; +import org.elasticsearch.index.mapper.MappedFieldType; +import org.elasticsearch.index.mapper.MapperTestCase; +import org.elasticsearch.index.mapper.SourceToParse; +import org.elasticsearch.index.mapper.extras.MapperExtrasPlugin; +import org.elasticsearch.index.mapper.extras.TokenCountFieldMapper; import org.elasticsearch.plugins.Plugin; import java.io.IOException; diff --git a/modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/filebeat-6.0.template.json b/modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/extras/filebeat-6.0.template.json similarity index 100% rename from modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/filebeat-6.0.template.json rename to modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/extras/filebeat-6.0.template.json diff --git a/modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/metricbeat-6.0.template.json b/modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/extras/metricbeat-6.0.template.json similarity index 100% rename from modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/metricbeat-6.0.template.json rename to modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/extras/metricbeat-6.0.template.json diff --git a/modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/packetbeat-6.0.template.json b/modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/extras/packetbeat-6.0.template.json similarity index 100% rename from modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/packetbeat-6.0.template.json rename to modules/mapper-extras/src/test/resources/org/elasticsearch/index/mapper/extras/packetbeat-6.0.template.json