Class

com.sksamuel.elastic4s.searches

SearchRequest

Related Doc: package searches

Permalink

case class SearchRequest(indexesTypes: IndexesAndTypes, aggs: Seq[AbstractAggregation] = Nil, collapse: Option[CollapseRequest] = None, fields: Fields = Fields(), fetchContext: Option[FetchSourceContext] = None, control: Control = Control(), scoring: Scoring = Scoring(), 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, suggestions: Suggestions = Suggestions(), windowing: Windowing = Windowing(), meta: Meta = Meta(), searchType: Option[SearchType] = None, searchAfter: Seq[Any] = Nil, version: Option[Boolean] = None, profile: Option[Boolean] = None, source: Option[String] = None, trackHits: Option[Boolean] = None, typedKeys: Option[Boolean] = None, restTotalHitsAsInt: Option[Boolean] = None, seqNoPrimaryTerm: Option[Boolean] = None) extends Product with Serializable

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

Instance Constructors

  1. new SearchRequest(indexesTypes: IndexesAndTypes, aggs: Seq[AbstractAggregation] = Nil, collapse: Option[CollapseRequest] = None, fields: Fields = Fields(), fetchContext: Option[FetchSourceContext] = None, control: Control = Control(), scoring: Scoring = Scoring(), 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, suggestions: Suggestions = Suggestions(), windowing: Windowing = Windowing(), meta: Meta = Meta(), searchType: Option[SearchType] = None, searchAfter: Seq[Any] = Nil, version: Option[Boolean] = None, profile: Option[Boolean] = None, source: Option[String] = None, trackHits: Option[Boolean] = None, typedKeys: Option[Boolean] = None, restTotalHitsAsInt: Option[Boolean] = None, seqNoPrimaryTerm: Option[Boolean] = None)

    Permalink

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def aggregations(first: AbstractAggregation, rest: AbstractAggregation*): SearchRequest

    Permalink
  5. def aggregations(aggs: Iterable[AbstractAggregation]): SearchRequest

    Permalink
  6. def aggs(iterable: Iterable[AbstractAggregation]): SearchRequest

    Permalink
  7. def aggs(first: AbstractAggregation, rest: AbstractAggregation*): SearchRequest

    Permalink
  8. val aggs: Seq[AbstractAggregation]

    Permalink
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def bool(block: ⇒ BoolQuery): SearchRequest

    Permalink
  11. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  12. def collapse(collapse: CollapseRequest): SearchRequest

    Permalink
  13. val collapse: Option[CollapseRequest]

    Permalink
  14. val control: Control

    Permalink
  15. def docValues(_fields: Seq[String]): SearchRequest

    Permalink
  16. def docValues(first: String, rest: String*): SearchRequest

    Permalink
  17. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. def explain(enabled: Boolean): SearchRequest

    Permalink
  19. def fetchContext(context: FetchSourceContext): SearchRequest

    Permalink
  20. val fetchContext: Option[FetchSourceContext]

    Permalink
  21. def fetchSource(fetch: Boolean): SearchRequest

    Permalink
  22. val fields: Fields

    Permalink
  23. def from(i: Int): SearchRequest

    Permalink
  24. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  25. def globalSuggestionText(text: String): SearchRequest

    Permalink
  26. val highlight: Option[Highlight]

    Permalink
  27. def highlighting(options: HighlightOptions, fields: Iterable[HighlightField]): SearchRequest

    Permalink
  28. def highlighting(options: HighlightOptions, first: HighlightField, rest: HighlightField*): SearchRequest

    Permalink
  29. def highlighting(fields: Iterable[HighlightField]): SearchRequest

    Permalink
  30. def highlighting(first: HighlightField, rest: HighlightField*): SearchRequest

    Permalink
  31. def indexBoost(tuples: (String, Double)*): SearchRequest

    Permalink
  32. def indexBoost(map: Map[String, Double]): SearchRequest

    Permalink
  33. val indexBoosts: Seq[(String, Double)]

    Permalink
  34. val indexesTypes: IndexesAndTypes

    Permalink
  35. def indicesOptions(options: IndicesOptionsRequest): SearchRequest

    Permalink
  36. val indicesOptions: Option[IndicesOptionsRequest]

    Permalink
  37. def inner(inners: Iterable[InnerHit]): SearchRequest

    Permalink
  38. def inner(first: InnerHit, rest: InnerHit*): SearchRequest

    Permalink
  39. val inners: Seq[InnerHit]

    Permalink
  40. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  41. def keepAlive(duration: FiniteDuration): SearchRequest

    Permalink
  42. def keepAlive(keepAlive: String): SearchRequest

    Permalink
  43. val keepAlive: Option[String]

    Permalink
  44. def limit(i: Int): SearchRequest

    Permalink
  45. def matchAllQuery(): SearchRequest

    Permalink
  46. def matchQuery(field: String, value: Any): SearchRequest

    Permalink
  47. val meta: Meta

    Permalink
  48. def minScore(min: Double): SearchRequest

    Permalink
  49. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  50. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  51. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  52. def postFilter(block: ⇒ Query): SearchRequest

    Permalink
  53. val postFilter: Option[Query]

    Permalink
  54. def preference(pref: String): SearchRequest

    Permalink
  55. def preference(pref: Preference): SearchRequest

    Permalink
  56. def prefix(name: String, value: Any): SearchRequest

    Permalink
  57. val profile: Option[Boolean]

    Permalink
  58. def query(q: Query): SearchRequest

    Permalink
  59. def query(string: String): SearchRequest

    Permalink

    Adds a single string query to this search

    Adds a single string query to this search

    string

    the query string

  60. val query: Option[Query]

    Permalink
  61. def rawQuery(json: String): SearchRequest

    Permalink

    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 "*" types("users", "tweets") limit 5 rawQuery {
    """{ "prefix": { "bands": { "prefix": "coldplay", "boost": 5.0, "rewrite": "yes" } } }"""
    } searchType SearchType.Scan
  62. def regexQuery(field: String, value: String): SearchRequest

    Permalink
  63. def regexQuery(tuple: (String, String)): SearchRequest

    Permalink
  64. def requestCache(requestCache: Boolean): SearchRequest

    Permalink
  65. val requestCache: Option[Boolean]

    Permalink
  66. def rescore(rescorers: Iterable[Rescore]): SearchRequest

    Permalink
  67. def rescore(first: Rescore, rest: Rescore*): SearchRequest

    Permalink
  68. def restTotalHitsAsInt(restTotalHitsAsInt: Boolean): SearchRequest

    Permalink
  69. val restTotalHitsAsInt: Option[Boolean]

    Permalink
  70. def routing(r: String): SearchRequest

    Permalink
  71. val scoring: Scoring

    Permalink
  72. def scriptfields(_fields: Iterable[ScriptField]): SearchRequest

    Permalink
  73. def scriptfields(fields: ScriptField*): SearchRequest

    Permalink

    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

  74. def scroll(duration: FiniteDuration): SearchRequest

    Permalink
  75. def scroll(keepAlive: String): SearchRequest

    Permalink
  76. def searchAfter(values: Seq[Any]): SearchRequest

    Permalink
  77. val searchAfter: Seq[Any]

    Permalink
  78. def searchType(searchType: SearchType): SearchRequest

    Permalink
  79. val searchType: Option[SearchType]

    Permalink
  80. def seqNoPrimaryTerm(enabled: Boolean): SearchRequest

    Permalink
  81. val seqNoPrimaryTerm: Option[Boolean]

    Permalink
  82. def size(i: Int): SearchRequest

    Permalink
  83. def slice(id: Int, max: Int): SearchRequest

    Permalink
  84. def sortBy(sorts: Iterable[Sort]): SearchRequest

    Permalink
  85. def sortBy(sorts: Sort*): SearchRequest

    Permalink
  86. def sortByFieldAsc(name: String): SearchRequest

    Permalink
  87. def sortByFieldDesc(name: String): SearchRequest

    Permalink
  88. val sorts: Seq[Sort]

    Permalink
  89. def source(json: String): SearchRequest

    Permalink

    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 "*" types("users", "tweets") limit 5 source {
    """{ "query": { "prefix": { "bands": { "prefix": "coldplay", "boost": 5.0, "rewrite": "yes" } } } }"""
    } searchType SearchType.Scan
  90. val source: Option[String]

    Permalink
  91. def sourceExclude(excludes: Iterable[String]): SearchRequest

    Permalink
  92. def sourceExclude(first: String, rest: String*): SearchRequest

    Permalink
  93. def sourceFiltering(includes: Iterable[String], excludes: Iterable[String]): SearchRequest

    Permalink
  94. def sourceInclude(includes: Iterable[String]): SearchRequest

    Permalink
  95. def sourceInclude(first: String, rest: String*): SearchRequest

    Permalink
  96. def start(i: Int): SearchRequest

    Permalink
  97. def stats(groups: String*): SearchRequest

    Permalink
  98. def storedFields(_fields: Iterable[String]): SearchRequest

    Permalink
  99. def storedFields(first: String, rest: String*): SearchRequest

    Permalink
  100. def suggestion(sugg: Suggestion): SearchRequest

    Permalink
  101. def suggestions(suggs: Iterable[Suggestion]): SearchRequest

    Permalink
  102. def suggestions(first: Suggestion, rest: Suggestion*): SearchRequest

    Permalink

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

  103. val suggestions: Suggestions

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

    Permalink
    Definition Classes
    AnyRef
  105. def termQuery(field: String, value: Any): SearchRequest

    Permalink
  106. def termQuery(tuple: (String, Any)): SearchRequest

    Permalink
  107. def terminateAfter(terminateAfter: Int): SearchRequest

    Permalink

    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.

  108. def timeout(timeout: FiniteDuration): SearchRequest

    Permalink
  109. val trackHits: Option[Boolean]

    Permalink
  110. def trackScores(enabled: Boolean): SearchRequest

    Permalink
  111. def trackTotalHits(value: Boolean): SearchRequest

    Permalink
  112. def typedKeys(enabled: Boolean): SearchRequest

    Permalink
  113. val typedKeys: Option[Boolean]

    Permalink
  114. def types(types: Iterable[String]): SearchRequest

    Permalink
  115. def types(first: String, rest: String*): SearchRequest

    Permalink
  116. def version(version: Boolean): SearchRequest

    Permalink
  117. val version: Option[Boolean]

    Permalink
  118. final def wait(arg0: Long, arg1: Int): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  120. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  121. val windowing: Windowing

    Permalink

Deprecated Value Members

  1. def fields(fields: String*): SearchRequest

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.0) Renamed to storedFields

  2. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

  3. def matchAll(): SearchRequest

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.2.0) Use matchAllQuery()

  4. def regex(tuple: (String, String)): SearchRequest

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.0) use regexQuery(...)

  5. def sort(sorts: Sort*): SearchRequest

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.0) use sortBy

  6. def term(field: String, value: Any): SearchRequest

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.0) use termQuery()

  7. def term(tuple: (String, Any)): SearchRequest

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.0) use termQuery()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped