Examples of documentMapperParser()


Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

        String bytes = Base64.encodeBytes(originalText.getBytes());
        threadPool = new ThreadPool("testing-only");

        MapperService mapperService = MapperTestUtils.newMapperService(threadPool);
        mapperService.documentMapperParser().putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());

        String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/multifield/multifield-mapping.json");

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(mapping);
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

        MapperService mapperService = MapperTestUtils.newMapperService(threadPool);
        mapperService.documentMapperParser().putTypeParser(AttachmentMapper.CONTENT_TYPE, new AttachmentMapper.TypeParser());

        String mapping = copyToStringFromClasspath("/org/elasticsearch/index/mapper/multifield/multifield-mapping.json");

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(mapping);

        ParsedDocument doc = documentMapper.parse("person", "1", XContentFactory.jsonBuilder()
                .startObject()
                    .field("file", bytes)
                .endObject()
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

public class SimpleExternalMappingTests extends ElasticsearchSingleNodeLuceneTestCase {

    @Test
    public void testExternalValues() throws Exception {
        MapperService mapperService = createIndex("test").mapperService();
        mapperService.documentMapperParser().putRootTypeParser(ExternalRootMapper.CONTENT_TYPE,
                new ExternalRootMapper.TypeParser());
        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL, "foo"));

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

    @Test
    public void testExternalValues() throws Exception {
        MapperService mapperService = createIndex("test").mapperService();
        mapperService.documentMapperParser().putRootTypeParser(ExternalRootMapper.CONTENT_TYPE,
                new ExternalRootMapper.TypeParser());
        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL, "foo"));

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(
                XContentFactory.jsonBuilder().startObject().startObject("type")
                .startObject(ExternalRootMapper.CONTENT_TYPE)
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

        mapperService.documentMapperParser().putRootTypeParser(ExternalRootMapper.CONTENT_TYPE,
                new ExternalRootMapper.TypeParser());
        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL, "foo"));

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(
                XContentFactory.jsonBuilder().startObject().startObject("type")
                .startObject(ExternalRootMapper.CONTENT_TYPE)
                .endObject()
                .startObject("properties")
                    .startObject("field").field("type", "external").endObject()
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

    }

    @Test
    public void testExternalValuesWithMultifield() throws Exception {
        MapperService mapperService = createIndex("test").mapperService();
        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL, "foo"));

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(
                XContentFactory.jsonBuilder().startObject().startObject("type").startObject("properties")
                .startObject("field")
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

    public void testExternalValuesWithMultifield() throws Exception {
        MapperService mapperService = createIndex("test").mapperService();
        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL, "foo"));

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(
                XContentFactory.jsonBuilder().startObject().startObject("type").startObject("properties")
                .startObject("field")
                    .field("type", RegisterExternalTypes.EXTERNAL)
                    .startObject("fields")
                        .startObject("field")
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

    @Test
    public void testExternalValuesWithMultifieldTwoLevels() throws Exception {
        MapperService mapperService = createIndex("test").mapperService();

        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL, "foo"));
        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL_BIS,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL_BIS, "bar"));

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

    public void testExternalValuesWithMultifieldTwoLevels() throws Exception {
        MapperService mapperService = createIndex("test").mapperService();

        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL, "foo"));
        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL_BIS,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL_BIS, "bar"));

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(
                XContentFactory.jsonBuilder().startObject().startObject("type").startObject("properties")
                .startObject("field")
View Full Code Here

Examples of org.elasticsearch.index.mapper.MapperService.documentMapperParser()

        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL, "foo"));
        mapperService.documentMapperParser().putTypeParser(RegisterExternalTypes.EXTERNAL_BIS,
                new ExternalMapper.TypeParser(RegisterExternalTypes.EXTERNAL_BIS, "bar"));

        DocumentMapper documentMapper = mapperService.documentMapperParser().parse(
                XContentFactory.jsonBuilder().startObject().startObject("type").startObject("properties")
                .startObject("field")
                    .field("type", RegisterExternalTypes.EXTERNAL)
                    .startObject("fields")
                        .startObject("field")
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.