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.
- Alphabetic
- By Inheritance
- SearchOptions
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- 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.
- 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.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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.
- 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.
- 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.
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- 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
andfields
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.
- 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.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def parentSpan(value: RequestSpan): SearchOptions
Sets the parent
RequestSpan
.Sets the parent
RequestSpan
.- returns
a copy of this with the change applied, for chaining.
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- 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
andJsonArray
respectively.- returns
a copy of this with the change applied, for chaining.
- 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.
- 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.
- 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.
- 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.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- 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.
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
- Deprecated