Class SearchOptions
Represents a number of query options that can be applied to a FTS query request.
Inheritance
System.Object
SearchOptions
Assembly: Couchbase.NetClient.dll
Syntax
public class SearchOptions : object
Fields
|
Improve this Doc
View Source
DefaultReadOnly
Declaration
public static readonly SearchOptions.ReadOnly DefaultReadOnly
Field Value
Methods
|
Improve this Doc
View Source
AsReadOnly()
Declaration
public SearchOptions.ReadOnly AsReadOnly()
Returns
|
Improve this Doc
View Source
CancellationToken(CancellationToken)
Declaration
public SearchOptions CancellationToken(CancellationToken token)
Parameters
Type |
Name |
Description |
CancellationToken |
token |
|
Returns
|
Improve this Doc
View Source
Collections(String[])
The name or names of the collections to target for search results.
Declaration
public SearchOptions Collections(params string[] collectionNames)
Parameters
Type |
Name |
Description |
System.String[] |
collectionNames |
The collection names.
|
Returns
|
Improve this Doc
View Source
ConsistentWith(MutationState)
Declaration
public SearchOptions ConsistentWith(MutationState mutationState)
Parameters
Returns
|
Improve this Doc
View Source
Deconstruct(out Nullable<Int32>, out Nullable<Int32>, out Nullable<Boolean>, out Nullable<String>, out IReadOnlyList<String>, out Nullable<IReadOnlyList<String>>, out Nullable<IReadOnlyList<ISearchFacet>>, out Nullable<SearchScanConsistency>, out JArray, out IReadOnlyDictionary<String, Object>, out IReadOnlyDictionary<String, Dictionary<String, List<Object>>>, out Boolean, out Nullable<String>, out String[], out Boolean, out MutationState, out CancellationToken, out Nullable<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
Type |
Name |
Description |
System.Nullable<System.Int32> |
limit |
|
System.Nullable<System.Int32> |
skip |
|
System.Nullable<System.Boolean> |
explain |
|
System.Nullable<System.String> |
highLightStyle |
|
IReadOnlyList<System.String> |
fields |
|
System.Nullable<IReadOnlyList<System.String>> |
highLightFields |
|
System.Nullable<IReadOnlyList<ISearchFacet>> |
facets |
|
System.Nullable<SearchScanConsistency> |
scanConsistency |
|
JArray |
sort |
|
IReadOnlyDictionary<System.String, System.Object> |
rawParameters |
|
IReadOnlyDictionary<System.String, Dictionary<System.String, List<System.Object>>> |
scanVectors |
|
System.Boolean |
disableScoring |
|
System.Nullable<System.String> |
scopeName |
|
System.String[] |
collectionNames |
|
System.Boolean |
includeLocations |
|
MutationState |
mutationState |
|
CancellationToken |
token |
|
System.Nullable<TimeSpan> |
timeoutValue |
|
IRetryStrategy |
retryStrategyValue |
|
IRequestSpan |
requestSpanValue |
|
|
Improve this Doc
View Source
DisableScoring(Boolean)
Declaration
public SearchOptions DisableScoring(bool disableScoring)
Parameters
Type |
Name |
Description |
System.Boolean |
disableScoring |
|
Returns
|
Improve this Doc
View Source
Explain(Boolean)
If true, the response will include additional search score explanations.
Declaration
public SearchOptions Explain(bool explain)
Parameters
Type |
Name |
Description |
System.Boolean |
explain |
|
Returns
|
Improve this Doc
View Source
Facets(ISearchFacet[])
ISearchFacets used to aggregate information collected on a particular result set.
Declaration
public SearchOptions Facets(params ISearchFacet[] searchFacets)
Parameters
Returns
|
Improve this Doc
View Source
Fields(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 |
System.String[] |
fields |
The indexed fields to return.
|
Returns
|
Improve this Doc
View Source
Highlight(HighLightStyle)
Allows setting of additional highlighting on the result set of matching terms.
Declaration
public SearchOptions Highlight(HighLightStyle highLightStyle)
Parameters
Returns
|
Improve this Doc
View Source
Highlight(HighLightStyle, String[])
Allows setting of additional highlighting on the result set of matching terms.
Declaration
public SearchOptions Highlight(HighLightStyle highLightStyle, params string[] fields)
Parameters
Type |
Name |
Description |
HighLightStyle |
highLightStyle |
The HighLightStyle to use.
|
System.String[] |
fields |
The specific terms or fields to highlight.
|
Returns
|
Improve this Doc
View Source
IncludeLocations(Boolean)
If set to true, will include the SearchRowLocations.
Declaration
public SearchOptions IncludeLocations(bool includeLocations)
Parameters
Type |
Name |
Description |
System.Boolean |
includeLocations |
indicating that the locations will be returned. The default is false.
|
Returns
|
Improve this Doc
View Source
Limit(Int32)
Limits the number of matching results from a returned result-set.
Declaration
public SearchOptions Limit(int limit)
Parameters
Type |
Name |
Description |
System.Int32 |
limit |
|
Returns
|
Improve this Doc
View Source
Raw(String, Object)
Declaration
public SearchOptions Raw(string name, object value)
Parameters
Type |
Name |
Description |
System.String |
name |
|
System.Object |
value |
|
Returns
|
Improve this Doc
View Source
RequestSpan(IRequestSpan)
A parent or external span for tracing.
Declaration
public SearchOptions RequestSpan(IRequestSpan span)
Parameters
Returns
|
Improve this Doc
View Source
RetryStrategy(IRetryStrategy)
Declaration
public SearchOptions RetryStrategy(IRetryStrategy retryStrategy)
Parameters
Returns
|
Improve this Doc
View Source
ScanConsistency(SearchScanConsistency)
Declaration
public SearchOptions ScanConsistency(SearchScanConsistency consistency)
Parameters
Returns
|
Improve this Doc
View Source
Scope(String)
The name of the scope to target for search results.
Declaration
public SearchOptions Scope(string scopeName)
Parameters
Type |
Name |
Description |
System.String |
scopeName |
The name of the scope.
|
Returns
|
Improve this Doc
View Source
Skip(Int32)
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 |
System.Int32 |
skip |
|
Returns
|
Improve this Doc
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
|
Improve this Doc
View Source
Sort(JObject)
Configures the sorting criteria for the search results using a custom .
Declaration
public SearchOptions Sort(JObject sort)
Parameters
Type |
Name |
Description |
JObject |
sort |
The sort.
|
Returns
|
Improve this Doc
View Source
Sort(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 |
System.String[] |
sort |
The field names to sort by.
|
Returns
|
Improve this Doc
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
|
Improve this Doc
View Source
ToJson(Nullable<String>)
Declaration
public JObject ToJson(string? indexName = null)
Parameters
Type |
Name |
Description |
System.Nullable<System.String> |
indexName |
|
Returns
|
Improve this Doc
View Source
ToString(String)
Declaration
public string ToString(string indexName)
Parameters
Type |
Name |
Description |
System.String |
indexName |
|
Returns
Type |
Description |
System.String |
|