Spring Data Elasticsearch

org.springframework.data.elasticsearch.core.query
Interface Query

All Known Subinterfaces:
SearchQuery
All Known Implementing Classes:
CriteriaQuery, NativeSearchQuery, StringQuery

public interface Query

Query

Author:
Rizwan Idrees, Mohsin Husen

Field Summary
static Pageable DEFAULT_PAGE
           
static int DEFAULT_PAGE_SIZE
           
 
Method Summary
 void addFields(String... fields)
          Add fields to be added as part of search request
 void addIndices(String... indices)
          Add Indices to be added as part of search request
<T extends Query>
T
addSort(Sort sort)
          Add Sort to query
 void addTypes(String... types)
          Add types to be searched
 List<String> getFields()
          Get fields to be returned as part of search request
 Collection<String> getIds()
          Get Ids
 List<String> getIndices()
          Get Indices to be searched
 float getMinScore()
          Get minimum score
 Pageable getPageable()
          Get page settings if defined
 String getRoute()
          Get route
 org.elasticsearch.action.search.SearchType getSearchType()
          Type of search
 Sort getSort()
           
 List<String> getTypes()
          Get types to be searched
<T extends Query>
T
setPageable(Pageable pageable)
          restrict result to entries on given page.
 

Field Detail

DEFAULT_PAGE_SIZE

static final int DEFAULT_PAGE_SIZE
See Also:
Constant Field Values

DEFAULT_PAGE

static final Pageable DEFAULT_PAGE
Method Detail

setPageable

<T extends Query> T setPageable(Pageable pageable)
restrict result to entries on given page. Corresponds to the 'start' and 'rows' parameter in elasticsearch

Parameters:
pageable -
Returns:

getPageable

Pageable getPageable()
Get page settings if defined

Returns:

addSort

<T extends Query> T addSort(Sort sort)
Add Sort to query

Parameters:
sort -
Returns:

getSort

Sort getSort()
Returns:
null if not set

getIndices

List<String> getIndices()
Get Indices to be searched

Returns:

addIndices

void addIndices(String... indices)
Add Indices to be added as part of search request

Parameters:
indices -

addTypes

void addTypes(String... types)
Add types to be searched

Parameters:
types -

getTypes

List<String> getTypes()
Get types to be searched

Returns:

addFields

void addFields(String... fields)
Add fields to be added as part of search request

Parameters:
fields -

getFields

List<String> getFields()
Get fields to be returned as part of search request

Returns:

getMinScore

float getMinScore()
Get minimum score

Returns:

getIds

Collection<String> getIds()
Get Ids

Returns:

getRoute

String getRoute()
Get route

Returns:

getSearchType

org.elasticsearch.action.search.SearchType getSearchType()
Type of search

Returns:

Spring Data Elasticsearch

Copyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.