Examples of rootMapper()


Examples of org.elasticsearch.index.mapper.DocumentMapper.rootMapper()

                .startObject("_uid").field("postings_format", "Lucene41").endObject()
                .endObject().endObject().string();

        CodecService codecService = createCodecService();
        DocumentMapper documentMapper = codecService.mapperService().documentMapperParser().parse(mapping);
        assertThat(documentMapper.rootMapper(UidFieldMapper.class).postingsFormatProvider(), instanceOf(PreBuiltPostingsFormatProvider.class));
        assertThat(documentMapper.rootMapper(UidFieldMapper.class).postingsFormatProvider().get(), instanceOf(Lucene41PostingsFormat.class));
    }

    @Test
    public void testResolveDocValuesFormatsFromMapping_default() throws Exception {
View Full Code Here

Examples of org.elasticsearch.index.mapper.DocumentMapper.rootMapper()

                .endObject().endObject().string();

        CodecService codecService = createCodecService();
        DocumentMapper documentMapper = codecService.mapperService().documentMapperParser().parse(mapping);
        assertThat(documentMapper.rootMapper(UidFieldMapper.class).postingsFormatProvider(), instanceOf(PreBuiltPostingsFormatProvider.class));
        assertThat(documentMapper.rootMapper(UidFieldMapper.class).postingsFormatProvider().get(), instanceOf(Lucene41PostingsFormat.class));
    }

    @Test
    public void testResolveDocValuesFormatsFromMapping_default() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
View Full Code Here

Examples of org.elasticsearch.index.mapper.DocumentMapper.rootMapper()

                .startObject("_version").field("doc_values_format", "Lucene410").endObject()
                .endObject().endObject().string();

        CodecService codecService = createCodecService();
        DocumentMapper documentMapper = codecService.mapperService().documentMapperParser().parse(mapping);
        assertThat(documentMapper.rootMapper(VersionFieldMapper.class).docValuesFormatProvider(), instanceOf(PreBuiltDocValuesFormatProvider.class));
        assertThat(documentMapper.rootMapper(VersionFieldMapper.class).docValuesFormatProvider().get(), instanceOf(Lucene410DocValuesFormat.class));
    }

    private static CodecService createCodecService() {
        return createCodecService(ImmutableSettings.Builder.EMPTY_SETTINGS);
View Full Code Here

Examples of org.elasticsearch.index.mapper.DocumentMapper.rootMapper()

                .endObject().endObject().string();

        CodecService codecService = createCodecService();
        DocumentMapper documentMapper = codecService.mapperService().documentMapperParser().parse(mapping);
        assertThat(documentMapper.rootMapper(VersionFieldMapper.class).docValuesFormatProvider(), instanceOf(PreBuiltDocValuesFormatProvider.class));
        assertThat(documentMapper.rootMapper(VersionFieldMapper.class).docValuesFormatProvider().get(), instanceOf(Lucene410DocValuesFormat.class));
    }

    private static CodecService createCodecService() {
        return createCodecService(ImmutableSettings.Builder.EMPTY_SETTINGS);
    }
View Full Code Here

Examples of org.elasticsearch.index.mapper.DocumentMapper.rootMapper()

    public void simpleIndexMapperTests() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
                .startObject("_index").field("enabled", true).field("store", "yes").endObject()
                .endObject().endObject().string();
        DocumentMapper docMapper = createIndex("test").mapperService().documentMapperParser().parse(mapping);
        IndexFieldMapper indexMapper = docMapper.rootMapper(IndexFieldMapper.class);
        assertThat(indexMapper.enabled(), equalTo(true));
        assertThat(indexMapper.fieldType().stored(), equalTo(true));
        assertThat(docMapper.mappers().indexName("_index").mapper(), instanceOf(IndexFieldMapper.class));

        ParsedDocument doc = docMapper.parse("type", "1", XContentFactory.jsonBuilder()
View Full Code Here

Examples of org.elasticsearch.index.mapper.DocumentMapper.rootMapper()

    public void explicitDisabledIndexMapperTests() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
                .startObject("_index").field("enabled", false).field("store", "yes").endObject()
                .endObject().endObject().string();
        DocumentMapper docMapper = createIndex("test").mapperService().documentMapperParser().parse(mapping);
        IndexFieldMapper indexMapper = docMapper.rootMapper(IndexFieldMapper.class);
        assertThat(indexMapper.enabled(), equalTo(false));
        assertThat(indexMapper.fieldType().stored(), equalTo(true));

        ParsedDocument doc = docMapper.parse("type", "1", XContentFactory.jsonBuilder()
                .startObject()
View Full Code Here

Examples of org.elasticsearch.index.mapper.DocumentMapper.rootMapper()

    @Test
    public void defaultDisabledIndexMapperTests() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
                .endObject().endObject().string();
        DocumentMapper docMapper = createIndex("test").mapperService().documentMapperParser().parse(mapping);
        IndexFieldMapper indexMapper = docMapper.rootMapper(IndexFieldMapper.class);
        assertThat(indexMapper.enabled(), equalTo(false));
        assertThat(indexMapper.fieldType().stored(), equalTo(false));

        ParsedDocument doc = docMapper.parse("type", "1", XContentFactory.jsonBuilder()
                .startObject()
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.