com.workday.esclient

EsQuery

trait EsQuery extends JestUtils

Trait wrapping Elasticsearch Query APIs

Linear Supertypes
JestUtils, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EsQuery
  2. JestUtils
  3. AnyRef
  4. 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.

  9. 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
    Annotations
    @VisibleForTesting()
  10. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. 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.

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. 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.

  16. 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
  17. 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
  18. def hashCode(): Int

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

    Definition Classes
    Any
  20. 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.

  21. 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.

  22. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  25. 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.

  26. 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.

  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. 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()
  29. def toString(): String

    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from JestUtils

Inherited from AnyRef

Inherited from Any

Ungrouped