com.workday.esclient

EsScanAndScroll

trait EsScanAndScroll extends JestUtils with EsQuery

Trait wrapping Elasticsearch Scan and Scroll APIs.

Linear Supertypes
EsQuery, JestUtils, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EsScanAndScroll
  2. EsQuery
  3. JestUtils
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def jest: JestClient

    Definition Classes
    JestUtils

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def count(index: String, typeName: Option[String] = None): EsResult[Int]

    Gets the count of documents in a given index (or alias) with optional filtering by type.

    Gets the count of documents in a given index (or alias) with optional filtering by type.

    index

    String index/alias name to get from.

    typeName

    String optional ES type name (aka sid).

    returns

    EsResult wrapping an integer count from ES.

    Definition Classes
    EsQuery
  9. def createScrolledSearch(index: String, typeName: String = "", query: String, params: Map[String, Any] = Map()): EsResult[ScanAndScrollResponse]

    Creates a scrolled search and returns the Jest response.

    Creates a scrolled search and returns the Jest response.

    index

    String index to search on

    typeName

    String type name to search

    query

    String query to search on

    params

    String params for search query

    returns

    EsResult of Elasticsearch scan and scroll response

  10. def createScrolledSearchIterator(index: String, typeName: String, query: String, params: Map[String, Any] = Map()): Iterator[EsResult[SearchHits]]

    Does a scan and scroll search and returns an iterator over the results.

    Does a scan and scroll search and returns an iterator over the results. (https://www.elastic.co/guide/en/elasticsearch/guide/current/scan-scroll.html)

    index

    String index to search

    typeName

    String index type

    query

    String query to perform

    params

    Map[String,Any] query parameters to include; defaults to empty Map

    returns

    Iterator over EsResults of SearchHits

  11. def createSearchAction(index: String, typeName: String = "", query: String, params: Map[String, Any] = Map()): Builder

    Returns a buildable search action for us with a Jest client.

    Returns a buildable search action for us with a Jest client.

    index

    String index to search from.

    typeName

    String optional ES type name.

    query

    String query content.

    params

    Optional map of additional search parameters.

    returns

    buildable search action object.

    Attributes
    protected
    Definition Classes
    EsQuery
    Annotations
    @VisibleForTesting()
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def get(index: String, id: String): EsResult[GetResponse]

    Makes a get request to Elasticsearch for the given id and index.

    Makes a get request to Elasticsearch for the given id and index.

    index

    String index to get from.

    id

    String id of document to get.

    returns

    EsResult wrapping the response from ES.

    Definition Classes
    EsQuery
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def getScrolledSearchResults(scrollID: String): EsResult[ScanAndScrollResponse]

    Gets the scrolled search result using a scroll ID

    Gets the scrolled search result using a scroll ID

    scrollID

    String provided scroll ID

    returns

    EsResult of Elasticsearch scan and scroll response

  18. def getSearchHitsCount(index: String, query: String): Int

    Gets the count of search hits for a given query and index.

    Gets the count of search hits for a given query and index.

    index

    String index to get from.

    query

    String query content.

    returns

    Int count of hits for given query.

    Definition Classes
    EsQuery
  19. def handleJestResult[J <: JestResult, T](jestResult: J, allowError: Boolean = false)(responseHandler: (J) ⇒ T): EsResult[T]

    Returns successful EsResult[T] or error response on JSON parsing/mapping failure.

    Returns successful EsResult[T] or error response on JSON parsing/mapping failure.

    J

    we need J here to allow things like jest's CountResult

    allowError

    - multiGet returns a GetResponse with an error field instead of a source, so we should report that normally

    returns

    EsResult[T] either EsResponse[T] or an error message type

    Attributes
    protected[this]
    Definition Classes
    JestUtils
  20. def handleSearchResult(searchResult: SearchResult): EsResult[EsSearchResponse]

    Handles the Jest result from an ES request and returns a JSON object.

    Handles the Jest result from an ES request and returns a JSON object.

    searchResult

    Jest SearchResult from ES.

    returns

    EsResult wrapping the handled response from ES.

    Attributes
    protected
    Definition Classes
    EsQuery
  21. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def multiGet(index: String, typeName: String, ids: Seq[String], params: Map[String, Any] = Map()): EsResult[MultiGetResponse]

    Makes a multi-get request to Elasticsearch for the given index and ids.

    Makes a multi-get request to Elasticsearch for the given index and ids.

    index

    String index to get from.

    typeName

    String ES type name.

    ids

    Sequence of ids of documents to get.

    params

    Optional map of additional get parameters.

    returns

    EsResult wrapping the response from ES.

    Definition Classes
    EsQuery
  24. def multiGetSourceField(index: String, typeName: String, ids: Seq[String], field: String): EsResult[MultiGetResponse]

    Makes a Multi Get request with the "_source" field provided as a parameter.

    Makes a Multi Get request with the "_source" field provided as a parameter.

    index

    String index to get from.

    typeName

    String ES type name.

    ids

    Sequence of ids of documents to get.

    field

    String "_source" field to specify which documents to return source for.

    returns

    EsResult wrapping the response from ES.

    Definition Classes
    EsQuery
  25. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  28. def search(index: String, typeName: String = "", query: String, params: Map[String, Any] = Map()): EsResult[EsSearchResponse]

    Makes a more sophisticated query on Elasticsearch including ES type names and parameters.

    Makes a more sophisticated query on Elasticsearch including ES type names and parameters.

    index

    String ES index to query.

    typeName

    String ES type name.

    query

    String query content.

    params

    Map of params to include in ES request.

    returns

    EsResult wrapping the response from ES.

    Definition Classes
    EsQuery
  29. def search(index: String, query: String): EsResult[EsSearchResponse]

    Makes a basic query on Elasticsearch and returns an EsResult of the response.

    Makes a basic query on Elasticsearch and returns an EsResult of the response.

    index

    String ES index to query.

    query

    String query content.

    returns

    EsResult wrapping the response from ES.

    Definition Classes
    EsQuery
  30. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  31. def toEsResult[T](jestResult: JestResult, allowError: Boolean = false)(implicit arg0: Manifest[T]): EsResult[T]

    Returns com.workday.esclient.EsResult[T] from JSON Jest response.

    Returns com.workday.esclient.EsResult[T] from JSON Jest response.

    T

    implicit manifest

    jestResult

    Jest response to be handled

    allowError

    Boolean value whether to parse error responses

    returns

    EsResult[T]

    Definition Classes
    JestUtils
    Annotations
    @VisibleForTesting()
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. def unlimitedSearch(index: String, typeName: String = "", query: String, scanAndScrollSize: Int): EsResult[EsSearchResponse]

    Performs a ScanAndScroll search, combines all paged results into an iterator and aggregates each result in the iterator into a single EsResult[EsSearchResponse].

    Performs a ScanAndScroll search, combines all paged results into an iterator and aggregates each result in the iterator into a single EsResult[EsSearchResponse].

    index

    String index to search

    typeName

    String index type

    query

    String query to perform

    scanAndScrollSize

    Int size of each scan and scroll response

    returns

    EsResult[EsSearchResponse] of aggregate result from scan-and-scrolled results

  34. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from EsQuery

Inherited from JestUtils

Inherited from AnyRef

Inherited from Any

Ungrouped