Class

com.sksamuel.elastic4s.searches

SearchDefinition

Related Doc: package searches

Permalink

case class SearchDefinition(indexesTypes: IndexesAndTypes, aggs: Seq[AbstractAggregation] = Nil, collapse: Option[CollapseDefinition] = None, fields: Fields = Fields(), fetchContext: Option[FetchSourceContext] = None, control: Control = Control(), scoring: Scoring = Scoring(), indicesOptions: Option[IndicesOptions] = None, inners: Seq[InnerHitDefinition] = Nil, indexBoosts: Seq[(String, Double)] = Nil, keepAlive: Option[String] = None, highlight: Option[Highlight] = None, query: Option[QueryDefinition] = None, postFilter: Option[QueryDefinition] = None, requestCache: Option[Boolean] = None, sorts: Seq[SortDefinition] = Nil, suggestions: Suggestions = Suggestions(), windowing: Windowing = Windowing(), meta: Meta = Meta(), searchType: Option[SearchType] = None, searchAfter: Seq[AnyRef] = Nil, version: Option[Boolean] = None) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SearchDefinition
  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 SearchDefinition(indexesTypes: IndexesAndTypes, aggs: Seq[AbstractAggregation] = Nil, collapse: Option[CollapseDefinition] = None, fields: Fields = Fields(), fetchContext: Option[FetchSourceContext] = None, control: Control = Control(), scoring: Scoring = Scoring(), indicesOptions: Option[IndicesOptions] = None, inners: Seq[InnerHitDefinition] = Nil, indexBoosts: Seq[(String, Double)] = Nil, keepAlive: Option[String] = None, highlight: Option[Highlight] = None, query: Option[QueryDefinition] = None, postFilter: Option[QueryDefinition] = None, requestCache: Option[Boolean] = None, sorts: Seq[SortDefinition] = Nil, suggestions: Suggestions = Suggestions(), windowing: Windowing = Windowing(), meta: Meta = Meta(), searchType: Option[SearchType] = None, searchAfter: Seq[AnyRef] = Nil, version: 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*): SearchDefinition

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

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

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

    Permalink
  8. val aggs: Seq[AbstractAggregation]

    Permalink
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def bool(block: ⇒ BoolQueryDefinition): SearchDefinition

    Permalink
  11. def clone(): AnyRef

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

    Permalink
  13. val collapse: Option[CollapseDefinition]

    Permalink
  14. val control: Control

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

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

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

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

    Permalink
  19. def extraSource(json: String): SearchDefinition

    Permalink

    Sets the source of the request as a json string.

    Sets the source of the request as a json string. Allows setting other parameters. Unlike rawQuery, setExtraSource is parsed at the "root" level Query must be valid json beginning with '{' and ending with '}'. Field names must be double quoted.

    Example:

    search in "*" types("users", "tweets") limit 5 extraSource {
    """{ "query": { "prefix": { "bands": { "prefix": "coldplay", "boost": 5.0, "rewrite": "yes" } } } }"""
    } searchType SearchType.Scan
  20. def fetchContext(context: FetchSourceContext): SearchDefinition

    Permalink
  21. val fetchContext: Option[FetchSourceContext]

    Permalink
  22. def fetchSource(fetch: Boolean): SearchDefinition

    Permalink
  23. val fields: Fields

    Permalink
  24. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  25. def from(i: Int): SearchDefinition

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. def globalSuggestionText(text: String): SearchDefinition

    Permalink
  28. val highlight: Option[Highlight]

    Permalink
  29. def highlighting(options: HighlightOptionsDefinition, fields: Iterable[HighlightFieldDefinition]): SearchDefinition

    Permalink
  30. def highlighting(options: HighlightOptionsDefinition, first: HighlightFieldDefinition, rest: HighlightFieldDefinition*): SearchDefinition

    Permalink
  31. def highlighting(fields: Iterable[HighlightFieldDefinition]): SearchDefinition

    Permalink
  32. def highlighting(first: HighlightFieldDefinition, rest: HighlightFieldDefinition*): SearchDefinition

    Permalink
  33. def indexBoost(tuples: (String, Double)*): SearchDefinition

    Permalink
  34. def indexBoost(map: Map[String, Double]): SearchDefinition

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

    Permalink
  36. val indexesTypes: IndexesAndTypes

    Permalink
  37. def indicesOptions(options: IndicesOptions): SearchDefinition

    Permalink
  38. val indicesOptions: Option[IndicesOptions]

    Permalink
  39. def inner(inners: Iterable[InnerHitDefinition]): SearchDefinition

    Permalink
  40. def inner(first: InnerHitDefinition, rest: InnerHitDefinition*): SearchDefinition

    Permalink
  41. val inners: Seq[InnerHitDefinition]

    Permalink
  42. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  43. def keepAlive(keepAlive: String): SearchDefinition

    Permalink
  44. val keepAlive: Option[String]

    Permalink
  45. def limit(i: Int): SearchDefinition

    Permalink
  46. def matchAllQuery(): SearchDefinition

    Permalink
  47. def matchQuery(field: String, value: Any): SearchDefinition

    Permalink
  48. val meta: Meta

    Permalink
  49. def minScore(min: Double): SearchDefinition

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

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

    Permalink
    Definition Classes
    AnyRef
  52. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  53. def postFilter(block: ⇒ QueryDefinition): SearchDefinition

    Permalink
  54. val postFilter: Option[QueryDefinition]

    Permalink
  55. def preference(pref: String): SearchDefinition

    Permalink
  56. def preference(pref: Preference): SearchDefinition

    Permalink
  57. def prefix(name: String, value: Any): SearchDefinition

    Permalink
  58. def query(q: QueryDefinition): SearchDefinition

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

    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[QueryDefinition]

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

    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): SearchDefinition

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

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

    Permalink
  65. val requestCache: Option[Boolean]

    Permalink
  66. def rescore(rescorers: Iterable[RescoreDefinition]): SearchDefinition

    Permalink
  67. def rescore(first: RescoreDefinition, rest: RescoreDefinition*): SearchDefinition

    Permalink
  68. def routing(r: String): SearchDefinition

    Permalink
  69. val scoring: Scoring

    Permalink
  70. def scriptfields(_fields: Iterable[ScriptFieldDefinition]): SearchDefinition

    Permalink
  71. def scriptfields(fields: ScriptFieldDefinition*): SearchDefinition

    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 ScriptFieldDefinition instances

    returns

    this, an instance of SearchDefinition

  72. def scroll(keepAlive: String): SearchDefinition

    Permalink
  73. def searchAfter(values: Seq[AnyRef]): SearchDefinition

    Permalink
  74. val searchAfter: Seq[AnyRef]

    Permalink
  75. def searchType(searchType: SearchType): SearchDefinition

    Permalink
  76. val searchType: Option[SearchType]

    Permalink
  77. def size(i: Int): SearchDefinition

    Permalink
  78. def slice(id: Int, max: Int): SearchDefinition

    Permalink
  79. def sortBy(sorts: Iterable[SortDefinition]): SearchDefinition

    Permalink
  80. def sortBy(sorts: SortDefinition*): SearchDefinition

    Permalink
  81. def sortByFieldAsc(name: String): SearchDefinition

    Permalink
  82. def sortByFieldDesc(name: String): SearchDefinition

    Permalink
  83. val sorts: Seq[SortDefinition]

    Permalink
  84. def source(json: String): SearchDefinition

    Permalink

    Sets the source of the request as a json string.

    Sets the source of the request as a json string. Note, setting anything other than the search type will cause this source to be overridden, consider using #setExtraSource(String).

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

    Example:

    search in "*" types("users", "tweets") limit 5 extraSource {
    """{ "query": { "prefix": { "bands": { "prefix": "coldplay", "boost": 5.0, "rewrite": "yes" } } } }"""
    } searchType SearchType.Scan
  85. def sourceExclude(excludes: Iterable[String]): SearchDefinition

    Permalink
  86. def sourceExclude(first: String, rest: String*): SearchDefinition

    Permalink
  87. def sourceFiltering(includes: Iterable[String], excludes: Iterable[String]): SearchDefinition

    Permalink
  88. def sourceInclude(includes: Iterable[String]): SearchDefinition

    Permalink
  89. def sourceInclude(first: String, rest: String*): SearchDefinition

    Permalink
  90. def start(i: Int): SearchDefinition

    Permalink
  91. def stats(groups: String*): SearchDefinition

    Permalink
  92. def storedFields(_fields: Iterable[String]): SearchDefinition

    Permalink
  93. def storedFields(first: String, rest: String*): SearchDefinition

    Permalink
  94. def suggestion(sugg: SuggestionDefinition): SearchDefinition

    Permalink
  95. def suggestions(suggs: Iterable[SuggestionDefinition]): SearchDefinition

    Permalink
  96. def suggestions(first: SuggestionDefinition, rest: SuggestionDefinition*): SearchDefinition

    Permalink

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

  97. val suggestions: Suggestions

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

    Permalink
    Definition Classes
    AnyRef
  99. def termQuery(field: String, value: Any): SearchDefinition

    Permalink
  100. def termQuery(tuple: (String, Any)): SearchDefinition

    Permalink
  101. def terminateAfter(terminateAfter: Int): SearchDefinition

    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.

  102. def timeout(timeout: FiniteDuration): SearchDefinition

    Permalink
  103. def trackScores(enabled: Boolean): SearchDefinition

    Permalink
  104. def types(types: Iterable[String]): SearchDefinition

    Permalink
  105. def types(first: String, rest: String*): SearchDefinition

    Permalink
  106. def version(version: Boolean): SearchDefinition

    Permalink
  107. val version: Option[Boolean]

    Permalink
  108. final def wait(): Unit

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

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

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

    Permalink

Deprecated Value Members

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

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.0) Renamed to storedFields

  2. def matchAll(): SearchDefinition

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.2.0) Use matchAllQuery()

  3. def regex(tuple: (String, String)): SearchDefinition

    Permalink
    Annotations
    @deprecated
    Deprecated

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

  4. def sort(sorts: SortDefinition*): SearchDefinition

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.0) use sortBy

  5. def term(field: String, value: Any): SearchDefinition

    Permalink
    Annotations
    @deprecated
    Deprecated

    (Since version 5.0.0) use termQuery()

  6. def term(tuple: (String, Any)): SearchDefinition

    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