Spring Data Elasticsearch

org.springframework.data.elasticsearch.core.query
Class StringQuery

java.lang.Object
  extended by org.springframework.data.elasticsearch.core.query.StringQuery
All Implemented Interfaces:
Query

public class StringQuery
extends Object

StringQuery

Author:
Rizwan Idrees, Mohsin Husen

Field Summary
protected  List<String> fields
           
protected  List<String> indices
           
protected  Pageable pageable
           
protected  Sort sort
           
protected  List<String> types
           
 
Fields inherited from interface org.springframework.data.elasticsearch.core.query.Query
DEFAULT_PAGE_SIZE
 
Constructor Summary
StringQuery(String source)
           
StringQuery(String source, Pageable pageable)
           
StringQuery(String source, Pageable pageable, Sort sort)
           
 
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
 List<String> getIndices()
          Get Indices to be searched
 Pageable getPageable()
          Get page settings if defined
 Sort getSort()
           
 String getSource()
           
 List<String> getTypes()
          Get types to be searched
<T extends Query>
T
setPageable(Pageable pageable)
          restrict result to entries on given page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pageable

protected Pageable pageable

sort

protected Sort sort

indices

protected List<String> indices

types

protected List<String> types

fields

protected List<String> fields
Constructor Detail

StringQuery

public StringQuery(String source)

StringQuery

public StringQuery(String source,
                   Pageable pageable)

StringQuery

public StringQuery(String source,
                   Pageable pageable,
                   Sort sort)
Method Detail

getSource

public String getSource()

getSort

public Sort getSort()
Specified by:
getSort in interface Query
Returns:
null if not set

getPageable

public Pageable getPageable()
Description copied from interface: Query
Get page settings if defined

Specified by:
getPageable in interface Query
Returns:

setPageable

public final <T extends Query> T setPageable(Pageable pageable)
Description copied from interface: Query
restrict result to entries on given page. Corresponds to the 'start' and 'rows' parameter in elasticsearch

Specified by:
setPageable in interface Query
Returns:

addFields

public void addFields(String... fields)
Description copied from interface: Query
Add fields to be added as part of search request

Specified by:
addFields in interface Query

getFields

public List<String> getFields()
Description copied from interface: Query
Get fields to be returned as part of search request

Specified by:
getFields in interface Query
Returns:

getIndices

public List<String> getIndices()
Description copied from interface: Query
Get Indices to be searched

Specified by:
getIndices in interface Query
Returns:

addIndices

public void addIndices(String... indices)
Description copied from interface: Query
Add Indices to be added as part of search request

Specified by:
addIndices in interface Query

addTypes

public void addTypes(String... types)
Description copied from interface: Query
Add types to be searched

Specified by:
addTypes in interface Query

getTypes

public List<String> getTypes()
Description copied from interface: Query
Get types to be searched

Specified by:
getTypes in interface Query
Returns:

addSort

public final <T extends Query> T addSort(Sort sort)
Description copied from interface: Query
Add Sort to query

Specified by:
addSort in interface Query
Returns:

Spring Data Elasticsearch

Copyright © 2013 BioMed Central. All Rights Reserved.