Class SearchOptions
Represents a number of query options that can be applied to a FTS query request.
Inheritance
SearchOptions
Assembly: Couchbase.NetClient.dll
Syntax
public class SearchOptions
Fields
|
Edit this page
View Source
DefaultReadOnly
Declaration
public static readonly SearchOptions.ReadOnly DefaultReadOnly
Field Value
Methods
|
Edit this page
View Source
AsReadOnly()
Declaration
public SearchOptions.ReadOnly AsReadOnly()
Returns
|
Edit this page
View Source
CancellationToken(CancellationToken)
Declaration
public SearchOptions CancellationToken(CancellationToken token)
Parameters
Returns
|
Edit this page
View Source
Collections(params string[])
The name or names of the collections to target for search results.
Declaration
public SearchOptions Collections(params string[] collectionNames)
Parameters
Type |
Name |
Description |
string[] |
collectionNames |
The collection names.
|
Returns
|
Edit this page
View Source
ConsistentWith(MutationState)
Declaration
public SearchOptions ConsistentWith(MutationState mutationState)
Parameters
Returns
|
Edit this page
View Source
Deconstruct(out int?, out int?, out bool?, out string?, out IReadOnlyList<string>, out IReadOnlyList<string>?, out IReadOnlyList<ISearchFacet>?, out SearchScanConsistency?, out JArray, out IReadOnlyDictionary<string, object>, out IReadOnlyDictionary<string, Dictionary<string, List<object>>>, out bool, out string?, out string[]?, out bool, out MutationState?, out CancellationToken, out TimeSpan?, out IRetryStrategy?, out IRequestSpan?)
Declaration
public void Deconstruct(out int? limit, out int? skip, out bool? explain, out string? highLightStyle, out IReadOnlyList<string> fields, out IReadOnlyList<string>? highLightFields, out IReadOnlyList<ISearchFacet>? facets, out SearchScanConsistency? scanConsistency, out JArray sort, out IReadOnlyDictionary<string, object> rawParameters, out IReadOnlyDictionary<string, Dictionary<string, List<object>>> scanVectors, out bool disableScoring, out string? scopeName, out string[]? collectionNames, out bool includeLocations, out MutationState? mutationState, out CancellationToken token, out TimeSpan? timeoutValue, out IRetryStrategy? retryStrategyValue, out IRequestSpan? requestSpanValue)
Parameters
|
Edit this page
View Source
DisableScoring(bool)
Declaration
public SearchOptions DisableScoring(bool disableScoring)
Parameters
Type |
Name |
Description |
bool |
disableScoring |
|
Returns
|
Edit this page
View Source
Explain(bool)
If true, the response will include additional search score explanations.
Declaration
public SearchOptions Explain(bool explain)
Parameters
Type |
Name |
Description |
bool |
explain |
|
Returns
|
Edit this page
View Source
Facets(params ISearchFacet[])
ISearchFacets used to aggregate information collected on a particular result set.
Declaration
public SearchOptions Facets(params ISearchFacet[] searchFacets)
Parameters
Returns
|
Edit this page
View Source
Fields(params string[])
List of fields values that should be returned in the result assuming that they were indexed.
Declaration
public SearchOptions Fields(params string[] fields)
Parameters
Type |
Name |
Description |
string[] |
fields |
The indexed fields to return.
|
Returns
|
Edit this page
View Source
Highlight(HighLightStyle)
Allows setting of additional highlighting on the result set of matching terms.
Declaration
public SearchOptions Highlight(HighLightStyle highLightStyle)
Parameters
Returns
|
Edit this page
View Source
Highlight(HighLightStyle, params string[])
Allows setting of additional highlighting on the result set of matching terms.
Declaration
public SearchOptions Highlight(HighLightStyle highLightStyle, params string[] fields)
Parameters
Returns
|
Edit this page
View Source
IncludeLocations(bool)
If set to true, will include the SearchRowLocations.
Declaration
[InterfaceStability(Level.Uncommitted)]
public SearchOptions IncludeLocations(bool includeLocations)
Parameters
Type |
Name |
Description |
bool |
includeLocations |
bool indicating that the locations will be returned. The default is false.
|
Returns
|
Edit this page
View Source
Limit(int)
Limits the number of matching results from a returned result-set.
Declaration
public SearchOptions Limit(int limit)
Parameters
Type |
Name |
Description |
int |
limit |
|
Returns
|
Edit this page
View Source
Raw(string, object)
Declaration
public SearchOptions Raw(string name, object value)
Parameters
Returns
|
Edit this page
View Source
RequestSpan(IRequestSpan)
A parent or external span for tracing.
Declaration
public SearchOptions RequestSpan(IRequestSpan span)
Parameters
Returns
|
Edit this page
View Source
RetryStrategy(IRetryStrategy)
Declaration
public SearchOptions RetryStrategy(IRetryStrategy retryStrategy)
Parameters
Returns
|
Edit this page
View Source
ScanConsistency(SearchScanConsistency)
Declaration
public SearchOptions ScanConsistency(SearchScanConsistency consistency)
Parameters
Returns
|
Edit this page
View Source
Scope(string)
The name of the scope to target for search results.
Declaration
public SearchOptions Scope(string scopeName)
Parameters
Type |
Name |
Description |
string |
scopeName |
The name of the scope.
|
Returns
|
Edit this page
View Source
Skip(int)
Skip indicates how many matching results to skip on the result set before returning matches.
Declaration
public SearchOptions Skip(int skip)
Parameters
Type |
Name |
Description |
int |
skip |
|
Returns
|
Edit this page
View Source
Sort(ISearchSort)
Configures the sorting criteria for the search results using an implementation of ISearchSort.
Declaration
public SearchOptions Sort(ISearchSort sort)
Parameters
Returns
|
Edit this page
View Source
Sort(JObject)
Configures the sorting criteria for the search results using a custom Newtonsoft.Json.Linq.JObject.
Declaration
public SearchOptions Sort(JObject sort)
Parameters
Type |
Name |
Description |
JObject |
sort |
The sort.
|
Returns
|
Edit this page
View Source
Sort(params string[])
Configures the list of fields which are used for sorting the search result. Fields with a prefix of "-" indicate a descending nature.
If no sort is provided, it is equal to sort("-_score"), since the server will sort it by score in descending order by default.
Declaration
public SearchOptions Sort(params string[] sort)
Parameters
Type |
Name |
Description |
string[] |
sort |
The field names to sort by.
|
Returns
|
Edit this page
View Source
Timeout(TimeSpan)
The server side timeout allows to specify an upper boundary of request execution so that it potentially doesn't run infinitely.
Declaration
public SearchOptions Timeout(TimeSpan timeout)
Parameters
Type |
Name |
Description |
TimeSpan |
timeout |
The max length of time that that will be given to execute the query.
|
Returns
|
Edit this page
View Source
ToJson(string?)
Declaration
public JObject ToJson(string? indexName = null)
Parameters
Type |
Name |
Description |
string |
indexName |
|
Returns
|
Edit this page
View Source
ToString(string)
Declaration
public string ToString(string indexName)
Parameters
Type |
Name |
Description |
string |
indexName |
|
Returns