Packages

case class SearchRequest(indexes: Indexes, aggs: Seq[AbstractAggregation] = Nil, collapse: Option[CollapseRequest] = None, docValues: Seq[String] = Nil, scriptFields: Seq[ScriptField] = Nil, storedFields: Seq[String] = Nil, fetchContext: Option[FetchSourceContext] = None, pref: Option[String] = None, routing: Option[String] = None, terminateAfter: Option[Int] = None, timeout: Option[Duration] = None, minScore: Option[Double] = None, rescorers: Seq[Rescore] = Nil, trackScores: Option[Boolean] = None, indicesOptions: Option[IndicesOptionsRequest] = None, inners: Seq[InnerHit] = Nil, indexBoosts: Seq[(String, Double)] = Nil, keepAlive: Option[String] = None, highlight: Option[Highlight] = None, query: Option[Query] = None, postFilter: Option[Query] = None, requestCache: Option[Boolean] = None, sorts: Seq[Sort] = Nil, suggs: Seq[Suggestion] = Nil, globalSuggestionText: Option[String] = None, from: Option[Int] = None, size: Option[Int] = None, slice: Option[(Int, Int)] = None, explain: Option[Boolean] = None, stats: Seq[String] = Nil, searchType: Option[SearchType] = None, searchAfter: Seq[Any] = Nil, version: Option[Boolean] = None, seqNoPrimaryTerm: Option[Boolean] = None, profile: Option[Boolean] = None, source: Option[String] = None, trackHits: Option[Any] = None, allowPartialSearchResults: Option[Boolean] = None, batchedReduceSize: Option[Int] = None, typedKeys: Option[Boolean] = None, runtimeMappings: Seq[RuntimeMapping] = Nil, ext: Map[String, Any] = Map.empty, knn: Option[Knn] = None, multipleKnn: Seq[Knn] = Nil, pit: Option[Pit] = None) extends Product with Serializable

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SearchRequest
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SearchRequest(indexes: Indexes, aggs: Seq[AbstractAggregation] = Nil, collapse: Option[CollapseRequest] = None, docValues: Seq[String] = Nil, scriptFields: Seq[ScriptField] = Nil, storedFields: Seq[String] = Nil, fetchContext: Option[FetchSourceContext] = None, pref: Option[String] = None, routing: Option[String] = None, terminateAfter: Option[Int] = None, timeout: Option[Duration] = None, minScore: Option[Double] = None, rescorers: Seq[Rescore] = Nil, trackScores: Option[Boolean] = None, indicesOptions: Option[IndicesOptionsRequest] = None, inners: Seq[InnerHit] = Nil, indexBoosts: Seq[(String, Double)] = Nil, keepAlive: Option[String] = None, highlight: Option[Highlight] = None, query: Option[Query] = None, postFilter: Option[Query] = None, requestCache: Option[Boolean] = None, sorts: Seq[Sort] = Nil, suggs: Seq[Suggestion] = Nil, globalSuggestionText: Option[String] = None, from: Option[Int] = None, size: Option[Int] = None, slice: Option[(Int, Int)] = None, explain: Option[Boolean] = None, stats: Seq[String] = Nil, searchType: Option[SearchType] = None, searchAfter: Seq[Any] = Nil, version: Option[Boolean] = None, seqNoPrimaryTerm: Option[Boolean] = None, profile: Option[Boolean] = None, source: Option[String] = None, trackHits: Option[Any] = None, allowPartialSearchResults: Option[Boolean] = None, batchedReduceSize: Option[Int] = None, typedKeys: Option[Boolean] = None, runtimeMappings: Seq[RuntimeMapping] = Nil, ext: Map[String, Any] = Map.empty, knn: Option[Knn] = None, multipleKnn: Seq[Knn] = Nil, pit: Option[Pit] = None)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def aggregations(first: AbstractAggregation, rest: AbstractAggregation*): SearchRequest
  5. def aggregations(aggs: Iterable[AbstractAggregation]): SearchRequest
  6. def aggs(iterable: Iterable[AbstractAggregation]): SearchRequest
  7. def aggs(first: AbstractAggregation, rest: AbstractAggregation*): SearchRequest
  8. val aggs: Seq[AbstractAggregation]
  9. val allowPartialSearchResults: Option[Boolean]
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. val batchedReduceSize: Option[Int]
  12. def bool(block: => BoolQuery): SearchRequest
  13. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  14. def collapse(collapse: CollapseRequest): SearchRequest
  15. val collapse: Option[CollapseRequest]
  16. def docValues(_fields: Seq[String]): SearchRequest
  17. def docValues(first: String, rest: String*): SearchRequest
  18. val docValues: Seq[String]
  19. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. def explain(enabled: Boolean): SearchRequest
  21. val explain: Option[Boolean]
  22. def ext(ext: Map[String, Any]): SearchRequest
  23. val ext: Map[String, Any]
  24. def fetchContext(context: FetchSourceContext): SearchRequest
  25. val fetchContext: Option[FetchSourceContext]
  26. def fetchSource(fetch: Boolean): SearchRequest
  27. def from(i: Int): SearchRequest
  28. val from: Option[Int]
  29. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  30. def globalSuggestionText(text: String): SearchRequest
  31. val globalSuggestionText: Option[String]
  32. val highlight: Option[Highlight]
  33. def highlighting(options: HighlightOptions, fields: Iterable[HighlightField]): SearchRequest
  34. def highlighting(options: HighlightOptions, first: HighlightField, rest: HighlightField*): SearchRequest
  35. def highlighting(fields: Iterable[HighlightField]): SearchRequest
  36. def highlighting(first: HighlightField, rest: HighlightField*): SearchRequest
  37. def indexBoost(tuples: (String, Double)*): SearchRequest
  38. def indexBoost(map: Map[String, Double]): SearchRequest
  39. val indexBoosts: Seq[(String, Double)]
  40. val indexes: Indexes
  41. def indicesOptions(options: IndicesOptionsRequest): SearchRequest
  42. val indicesOptions: Option[IndicesOptionsRequest]
  43. def inner(inners: Iterable[InnerHit]): SearchRequest
  44. def inner(first: InnerHit, rest: InnerHit*): SearchRequest
  45. val inners: Seq[InnerHit]
  46. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  47. def keepAlive(duration: FiniteDuration): SearchRequest
  48. def keepAlive(keepAlive: String): SearchRequest
  49. val keepAlive: Option[String]
  50. def knn(knn: Knn): SearchRequest
  51. val knn: Option[Knn]
  52. def limit(i: Int): SearchRequest
  53. def matchAllQuery(): SearchRequest
  54. def matchQuery(field: String, value: Any): SearchRequest
  55. def minScore(min: Double): SearchRequest
  56. val minScore: Option[Double]
  57. def multipleKnn(multipleKnn: Iterable[Knn]): SearchRequest
  58. val multipleKnn: Seq[Knn]
  59. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  60. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  61. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  62. def pit(pit: Pit): SearchRequest
  63. val pit: Option[Pit]
  64. def postFilter(block: => Query): SearchRequest
  65. val postFilter: Option[Query]
  66. val pref: Option[String]
  67. def preference(pref: String): SearchRequest
  68. def preference(pref: Preference): SearchRequest
  69. def prefix(name: String, value: Any): SearchRequest
  70. def productElementNames: Iterator[String]
    Definition Classes
    Product
  71. val profile: Option[Boolean]
  72. def query(q: Query): SearchRequest
  73. def query(string: String): SearchRequest

    Adds a single string query to this search

    Adds a single string query to this search

    string

    the query string

  74. val query: Option[Query]
  75. def rawQuery(json: String): SearchRequest

    Expects a query in json format and sets the query of the search request.

    Expects a query in json format and sets the query of the search request. i.e. underneath a "query" field if referencing HTTP API Query must be valid json beginning with '{' and ending with '}'. Field names must be double quoted.

    Example:

    search in "*" limit 5 rawQuery {
    """{ "prefix": { "bands": { "prefix": "coldplay", "boost": 5.0, "rewrite": "yes" } } }"""
    } searchType SearchType.Scan
  76. def regexQuery(field: String, value: String): SearchRequest
  77. def regexQuery(tuple: (String, String)): SearchRequest
  78. def requestCache(requestCache: Boolean): SearchRequest
  79. val requestCache: Option[Boolean]
  80. def rescore(rescorers: Iterable[Rescore]): SearchRequest
  81. def rescore(first: Rescore, rest: Rescore*): SearchRequest
  82. val rescorers: Seq[Rescore]
  83. def routing(r: String): SearchRequest
  84. val routing: Option[String]
  85. def runtimeMappings(mappings: Iterable[RuntimeMapping]): SearchRequest
  86. def runtimeMappings(mappings: RuntimeMapping*): SearchRequest
  87. val runtimeMappings: Seq[RuntimeMapping]
  88. val scriptFields: Seq[ScriptField]
  89. def scriptfields(_fields: Iterable[ScriptField]): SearchRequest
  90. def scriptfields(fields: ScriptField*): SearchRequest

    This method introduces zero or more script field definitions into the search construction

    This method introduces zero or more script field definitions into the search construction

    fields

    zero or more ScriptField instances

    returns

    this, an instance of SearchRequest

  91. def scroll(duration: FiniteDuration): SearchRequest
  92. def scroll(keepAlive: String): SearchRequest
  93. def searchAfter(values: Seq[Any]): SearchRequest
  94. val searchAfter: Seq[Any]
  95. def searchType(searchType: SearchType): SearchRequest
  96. val searchType: Option[SearchType]
  97. def seqNoPrimaryTerm(seqNoPrimaryTerm: Boolean): SearchRequest
  98. val seqNoPrimaryTerm: Option[Boolean]
  99. def size(i: Int): SearchRequest
  100. val size: Option[Int]
  101. def slice(id: Int, max: Int): SearchRequest
  102. val slice: Option[(Int, Int)]
  103. def sortBy(sorts: Iterable[Sort]): SearchRequest
  104. def sortBy(sorts: Sort*): SearchRequest
  105. def sortByFieldAsc(name: String): SearchRequest
  106. def sortByFieldDesc(name: String): SearchRequest
  107. val sorts: Seq[Sort]
  108. def source(json: String): SearchRequest

    Sets the source of the request as a json string.

    Sets the source of the request as a json string. Note, if you use this method any other body-level settings will be ignored.

    HTTP query-parameter settings can still be used, eg limit, routing, search type etc.

    Unlike rawQuery, source is parsed at the "root" level Query must be valid json beginning with '{' and ending with '}'. Field names must be double quoted.

    NOTE: This method only works with the HTTP client.

    Example:

    search in "*" limit 5 source {
    """{ "query": { "prefix": { "bands": { "prefix": "coldplay", "boost": 5.0, "rewrite": "yes" } } } }"""
    } searchType SearchType.Scan
  109. val source: Option[String]
  110. def sourceExclude(excludes: Iterable[String]): SearchRequest
  111. def sourceExclude(first: String, rest: String*): SearchRequest
  112. def sourceFiltering(includes: Iterable[String], excludes: Iterable[String]): SearchRequest
  113. def sourceInclude(includes: Iterable[String]): SearchRequest
  114. def sourceInclude(first: String, rest: String*): SearchRequest
  115. def start(i: Int): SearchRequest
  116. def stats(groups: String*): SearchRequest
  117. val stats: Seq[String]
  118. def storedFields(_fields: Iterable[String]): SearchRequest
  119. def storedFields(first: String, rest: String*): SearchRequest
  120. val storedFields: Seq[String]
  121. def suggestion(sugg: Suggestion): SearchRequest
  122. def suggestions(suggs: Iterable[Suggestion]): SearchRequest
  123. def suggestions(first: Suggestion, rest: Suggestion*): SearchRequest

    Adds a new suggestion to the search request, which can be looked up in the response using the name provided.

  124. val suggs: Seq[Suggestion]
  125. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  126. def termQuery(field: String, value: Any): SearchRequest
  127. def termQuery(tuple: (String, Any)): SearchRequest
  128. def terminateAfter(terminateAfter: Int): SearchRequest

    The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.

    The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. If set, the response will have a boolean field terminated_early to indicate whether the query execution has actually terminated early. Defaults to no.

  129. val terminateAfter: Option[Int]
  130. def timeout(timeout: FiniteDuration): SearchRequest
  131. val timeout: Option[Duration]
  132. val trackHits: Option[Any]
  133. def trackScores(enabled: Boolean): SearchRequest
  134. val trackScores: Option[Boolean]
  135. def trackTotalHits(value: Long): SearchRequest
  136. def trackTotalHits(value: Boolean): SearchRequest
  137. def typedKeys(enabled: Boolean): SearchRequest
  138. val typedKeys: Option[Boolean]
  139. def version(version: Boolean): SearchRequest
  140. val version: Option[Boolean]
  141. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  142. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  143. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped