Search in sources :

Example 16 with DocumentMapperParser

use of org.elasticsearch.index.mapper.DocumentMapperParser in project elasticsearch by elastic.

the class Murmur3FieldMapperTests method setup.

@Before
public void setup() {
    indexService = createIndex("test");
    mapperRegistry = new MapperRegistry(Collections.singletonMap(Murmur3FieldMapper.CONTENT_TYPE, new Murmur3FieldMapper.TypeParser()), Collections.emptyMap());
    Supplier<QueryShardContext> queryShardContext = () -> {
        return indexService.newQueryShardContext(0, null, () -> {
            throw new UnsupportedOperationException();
        });
    };
    parser = new DocumentMapperParser(indexService.getIndexSettings(), indexService.mapperService(), indexService.getIndexAnalyzers(), indexService.xContentRegistry(), indexService.similarityService(), mapperRegistry, queryShardContext);
}
Also used : MapperRegistry(org.elasticsearch.indices.mapper.MapperRegistry) QueryShardContext(org.elasticsearch.index.query.QueryShardContext) DocumentMapperParser(org.elasticsearch.index.mapper.DocumentMapperParser) Before(org.junit.Before)

Aggregations

DocumentMapperParser (org.elasticsearch.index.mapper.DocumentMapperParser)16 CompressedXContent (org.elasticsearch.common.compress.CompressedXContent)14 DocumentMapper (org.elasticsearch.index.mapper.DocumentMapper)10 Matchers.containsString (org.hamcrest.Matchers.containsString)7 Settings (org.elasticsearch.common.settings.Settings)4 IndexService (org.elasticsearch.index.IndexService)4 MapperParsingException (org.elasticsearch.index.mapper.MapperParsingException)4 Version (org.elasticsearch.Version)2 QueryShardContext (org.elasticsearch.index.query.QueryShardContext)2 Before (org.junit.Before)2 KeywordAnalyzer (org.apache.lucene.analysis.core.KeywordAnalyzer)1 ImmutableSettings (org.elasticsearch.common.settings.ImmutableSettings)1 Index (org.elasticsearch.index.Index)1 AnalysisService (org.elasticsearch.index.analysis.AnalysisService)1 AnalyzerProviderFactory (org.elasticsearch.index.analysis.AnalyzerProviderFactory)1 PreBuiltAnalyzerProviderFactory (org.elasticsearch.index.analysis.PreBuiltAnalyzerProviderFactory)1 PostingsFormatService (org.elasticsearch.index.codec.postingsformat.PostingsFormatService)1 OpenNlpMapper (org.elasticsearch.index.mapper.opennlp.OpenNlpMapper)1 SimilarityLookupService (org.elasticsearch.index.similarity.SimilarityLookupService)1 MapperRegistry (org.elasticsearch.indices.mapper.MapperRegistry)1