Package org.elasticsearch.index.mapper

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


                .field("store", "yes").field("index", "not_analyzed")
                .endObject()
                .endObject().endObject().string();
        IndexService indexServices = createIndex("test");
        DocumentMapper docMapper = indexServices.mapperService().documentMapperParser().parse("type", mapping);
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(true));
        assertEquals(IndexOptions.DOCS, docMapper.boostFieldMapper().fieldType().indexOptions());
        docMapper.refreshSource();
        docMapper = indexServices.mapperService().documentMapperParser().parse("type", docMapper.mappingSource().string());
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(true));
        assertEquals(IndexOptions.DOCS, docMapper.boostFieldMapper().fieldType().indexOptions());
View Full Code Here


                .endObject()
                .endObject().endObject().string();
        IndexService indexServices = createIndex("test");
        DocumentMapper docMapper = indexServices.mapperService().documentMapperParser().parse("type", mapping);
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(true));
        assertEquals(IndexOptions.DOCS, docMapper.boostFieldMapper().fieldType().indexOptions());
        docMapper.refreshSource();
        docMapper = indexServices.mapperService().documentMapperParser().parse("type", docMapper.mappingSource().string());
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(true));
        assertEquals(IndexOptions.DOCS, docMapper.boostFieldMapper().fieldType().indexOptions());
    }
View Full Code Here

        DocumentMapper docMapper = indexServices.mapperService().documentMapperParser().parse("type", mapping);
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(true));
        assertEquals(IndexOptions.DOCS, docMapper.boostFieldMapper().fieldType().indexOptions());
        docMapper.refreshSource();
        docMapper = indexServices.mapperService().documentMapperParser().parse("type", docMapper.mappingSource().string());
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(true));
        assertEquals(IndexOptions.DOCS, docMapper.boostFieldMapper().fieldType().indexOptions());
    }
}
View Full Code Here

        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(true));
        assertEquals(IndexOptions.DOCS, docMapper.boostFieldMapper().fieldType().indexOptions());
        docMapper.refreshSource();
        docMapper = indexServices.mapperService().documentMapperParser().parse("type", docMapper.mappingSource().string());
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(true));
        assertEquals(IndexOptions.DOCS, docMapper.boostFieldMapper().fieldType().indexOptions());
    }
}
View Full Code Here

    @Test
    public void testDefaultValues() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type").endObject().string();
        DocumentMapper docMapper = createIndex("test").mapperService().documentMapperParser().parse(mapping);
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(BoostFieldMapper.Defaults.FIELD_TYPE.stored()));
        assertThat(docMapper.boostFieldMapper().fieldType().indexOptions(), equalTo(BoostFieldMapper.Defaults.FIELD_TYPE.indexOptions()));
    }

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

    @Test
    public void testDefaultValues() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type").endObject().string();
        DocumentMapper docMapper = createIndex("test").mapperService().documentMapperParser().parse(mapping);
        assertThat(docMapper.boostFieldMapper().fieldType().stored(), equalTo(BoostFieldMapper.Defaults.FIELD_TYPE.stored()));
        assertThat(docMapper.boostFieldMapper().fieldType().indexOptions(), equalTo(BoostFieldMapper.Defaults.FIELD_TYPE.indexOptions()));
    }

    @Test
    public void testSetValues() throws Exception {
        String mapping = XContentFactory.jsonBuilder().startObject().startObject("type")
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.