List of usage examples for org.springframework.data.elasticsearch.core.query NativeSearchQuery addTypes
void addTypes(String... types);
From source file:org.springframework.data.elasticsearch.core.query.NativeSearchQueryBuilder.java
public NativeSearchQuery build() { NativeSearchQuery nativeSearchQuery = new NativeSearchQuery(queryBuilder, filterBuilder, sortBuilder, highlightFields);//from www.j ava 2 s . co m if (pageable != null) { nativeSearchQuery.setPageable(pageable); } if (indices != null) { nativeSearchQuery.addIndices(indices); } if (types != null) { nativeSearchQuery.addTypes(types); } if (fields != null) { nativeSearchQuery.addFields(fields); } if (CollectionUtils.isNotEmpty(facetRequests)) { nativeSearchQuery.setFacets(facetRequests); } return nativeSearchQuery; }