Packages

case class SearchOptions(limit: Option[Int] = None, skip: Option[Int] = None, explain: Option[Boolean] = None, highlightStyle: Option[HighlightStyle] = None, highlightFields: Option[Seq[String]] = None, fields: Option[Seq[String]] = None, collections: Option[Seq[String]] = None, sort: Option[Seq[SearchSort]] = None, facets: Option[Map[String, SearchFacet]] = None, serverSideTimeout: Option[Duration] = None, deferredError: Option[RuntimeException] = None, scanConsistency: Option[SearchScanConsistency] = None, timeout: Option[Duration] = None, retryStrategy: Option[RetryStrategy] = None, parentSpan: Option[RequestSpan] = None, raw: Option[Map[String, Any]] = None, disableScoring: Boolean = false, includeLocations: Boolean = false) extends Product with Serializable

Options to be used with a Full Text Search query.

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SearchOptions
  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 SearchOptions(limit: Option[Int] = None, skip: Option[Int] = None, explain: Option[Boolean] = None, highlightStyle: Option[HighlightStyle] = None, highlightFields: Option[Seq[String]] = None, fields: Option[Seq[String]] = None, collections: Option[Seq[String]] = None, sort: Option[Seq[SearchSort]] = None, facets: Option[Map[String, SearchFacet]] = None, serverSideTimeout: Option[Duration] = None, deferredError: Option[RuntimeException] = None, scanConsistency: Option[SearchScanConsistency] = None, timeout: Option[Duration] = None, retryStrategy: Option[RetryStrategy] = None, parentSpan: Option[RequestSpan] = None, raw: Option[Map[String, Any]] = None, disableScoring: Boolean = false, includeLocations: Boolean = false)

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. def collections(collectionNames: Seq[String]): SearchOptions

    Allows to limit the search query to a specific list of collection names.

    Allows to limit the search query to a specific list of collection names.

    NOTE: this is only supported with server 7.0 and later.

    collectionNames

    the names of the collections this query should be limited to.

    returns

    this SearchOptions for chaining.

  7. def disableScoring(value: Boolean): SearchOptions

    If set to true, the server will not perform any scoring on the hits.

    If set to true, the server will not perform any scoring on the hits.

    This could provide a performance improvement in cases where the score is not required.

    This parameter only has an effect if the Couchbase Cluster version is 6.6.0 or above.

    returns

    a copy of this with the change applied, for chaining.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def explain(value: Boolean): SearchOptions

    Activates the explanation of each result hit in the response.

    Activates the explanation of each result hit in the response. The default is false.

    returns

    this SearchOptions for chaining.

  10. def facets(facets: Map[String, SearchFacet]): SearchOptions

    Sets the search facets, which allow aggregating information collected on a particular result-set.

    Sets the search facets, which allow aggregating information collected on a particular result-set.

    facets

    the facets to use

    returns

    this SearchOptions for chaining.

  11. def fields(fields: Seq[String]): SearchOptions

    Configures the list of fields for which the whole value should be included in the response.

    Configures the list of fields for which the whole value should be included in the response. If empty, no field values are included.

    This drives the inclusion of the com.couchbase.client.scala.search.result.SearchRow.fieldsAs fields in each SearchRow hit.

    Note that to be highlighted, the fields must be stored in the FTS index.

    returns

    this SearchOptions for chaining.

  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  13. def highlight(style: Option[HighlightStyle], fields: Option[Seq[String]]): SearchOptions

    Configures the highlighting of matches in the response.

    Configures the highlighting of matches in the response.

    Highlighting is disabled by default.

    This drives the inclusion of the fragments in each com.couchbase.client.scala.search.result.SearchRow row.

    Note that to be highlighted, the fields must be stored in the FTS index.

    Both style and fields are optional.

    style

    the HighlightStyle to apply.

    fields

    the optional fields on which to highlight. If none, all fields where there is a match are highlighted.

    returns

    this SearchOptions for chaining.

  14. def includeLocations(value: Boolean): SearchOptions

    If set to true, will include the location in the search rows.

    If set to true, will include the location in the search rows.

    value

    set to true if the locations should be included.

    returns

    a copy of this with the change applied, for chaining.

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. def limit(limit: Int): SearchOptions

    Add a limit to the query on the number of rows it can return.

    Add a limit to the query on the number of rows it can return.

    If not set, the default is 10.

    limit

    the maximum number of rows to return.

    returns

    this SearchOptions for chaining.

  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  20. def parentSpan(value: RequestSpan): SearchOptions

    Sets the parent RequestSpan.

    Sets the parent RequestSpan.

    returns

    a copy of this with the change applied, for chaining.

  21. def productElementNames: Iterator[String]
    Definition Classes
    Product
  22. def raw(raw: Map[String, Any]): SearchOptions

    Allows providing custom JSON key/value pairs for advanced usage.

    Allows providing custom JSON key/value pairs for advanced usage.

    If available, it is recommended to use the methods on this object to customize the query. This method should only be used if no such setter can be found (i.e. if an undocumented property should be set or you are using an older client and a new server-configuration property has been added to the cluster).

    Note that the values will be passed through a JSON encoder, so do not provide already encoded JSON as the value. If you want to pass objects or arrays, you can use JsonObject and JsonArray respectively.

    returns

    a copy of this with the change applied, for chaining.

  23. def scanConsistency(scanConsistency: SearchScanConsistency): SearchOptions

    Sets the consistency to consider for this FTS query.

    Sets the consistency to consider for this FTS query. See SearchScanConsistency for documentation.

    returns

    this SearchOptions for chaining.

  24. def skip(skip: Int): SearchOptions

    Set the number of rows to skip (eg.

    Set the number of rows to skip (eg. for pagination).

    If not set, the default is 0.

    skip

    the number of results to skip.

    returns

    this SearchOptions for chaining.

  25. def sort(fields: Seq[SearchSort]): SearchOptions

    Configures the list of fields (including special fields) which are used for sorting purposes.

    Configures the list of fields (including special fields) which are used for sorting purposes. If empty, the default sorting (descending by score) is used by the server.

    See com.couchbase.client.scala.search.sort.SearchSort for the various sorting options.

    If no sort is provided, it is equal to sort(Seq("-_score")), since the server will sort it by score in descending order.

    fields

    the fields that should take part in the sorting.

    returns

    this SearchOptions for chaining.

  26. def sortByFields(fields: Seq[String]): SearchOptions

    Configures the list of fields (including special fields) which are used for sorting purposes.

    Configures the list of fields (including special fields) which are used for sorting purposes. If empty, the default sorting (descending by score) is used by the server.

    The list of sort fields can include actual fields (like "firstname" but then they must be stored in the index, configured in the server side mapping). Fields provided first are considered first and in a "tie" case the next sort field is considered. So sorting by "firstname" and then "lastname" will first sort ascending by the firstname and if the names are equal then sort ascending by lastname. Special fields like "_id" and "_score" can also be used. If prefixed with "-" the sort order is set to descending.

    If no sort is provided, it is equal to sort(Seq("-_score")), since the server will sort it by score in descending order.

    fields

    the fields that should take part in the sorting.

    returns

    this SearchOptions for chaining.

  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def timeout(timeout: Duration): SearchOptions

    Sets a maximum timeout for processing.

    Sets a maximum timeout for processing.

    timeout

    the duration of the timeout.

    returns

    a copy of this with the change applied, for chaining.

  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  31. 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
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped