Package org.elasticsearch.index.mapper

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


        when(smartNameFieldMappers.mapper()).thenReturn(fieldMapper);
        when(fieldMapper.searchAnalyzer()).thenReturn(analyzer);

        MapperService mapperService = mock(MapperService.class);
        when(searchContext.mapperService()).thenReturn(mapperService);
        when(mapperService.searchAnalyzer()).thenReturn(analyzer);

        MatchQueryBuilder builder = new io.crate.lucene.match.MultiMatchQueryBuilder(
                searchContext, cache, new BytesRef("cross_fields"), Collections.emptyMap());
        Map<String, Object> fields = MapBuilder.<String, Object>newMapBuilder()
                .put("col1", null)
View Full Code Here


    private SearchContext mockSearchContext() {
        Analyzer analyzer = new GermanAnalyzer(Version.LUCENE_4_9);
        SearchContext searchContext = mock(SearchContext.class);
        MapperService mapperService = mock(MapperService.class);
        when(searchContext.mapperService()).thenReturn(mapperService);
        when(mapperService.searchAnalyzer()).thenReturn(analyzer);
        return searchContext;
    }
}
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.