Class QueryDescriptorBase<TDescriptor, TInterface>
Inheritance
QueryDescriptorBase<TDescriptor, TInterface>
Assembly: OpenSearch.Client.dll
Syntax
public abstract class QueryDescriptorBase<TDescriptor, TInterface> : DescriptorBase<TDescriptor, TInterface>, IDescriptor, IQuery where TDescriptor : QueryDescriptorBase<TDescriptor, TInterface>, TInterface where TInterface : class, IQuery
Type Parameters
Name |
Description |
TDescriptor |
|
TInterface |
|
Properties
|
Edit this page
View Source
Conditionless
Whether the query is conditionless. A conditionless query is not serialized as part of the request
sent to OpenSearch.
Declaration
protected abstract bool Conditionless { get; }
Property Value
Methods
|
Edit this page
View Source
Boost(double?)
Provides a boost to this query to influence its relevance score.
For example, a query with a boost of 2 is twice as important as a query with a boost of 1,
although the actual boost value that is applied undergoes normalization and internal optimization.
Declaration
public TDescriptor Boost(double? boost)
Parameters
Type |
Name |
Description |
double? |
boost |
|
Returns
Type |
Description |
TDescriptor |
|
|
Edit this page
View Source
Name(string)
The name of the query. Allows you to retrieve for each document what part of the query it matched on.
Declaration
public TDescriptor Name(string name)
Parameters
Type |
Name |
Description |
string |
name |
|
Returns
Type |
Description |
TDescriptor |
|
|
Edit this page
View Source
Strict(bool)
Whether the query should be treated as strict. A strict query will throw an exception when serialized
if it is Conditionless.
Declaration
public TDescriptor Strict(bool strict = true)
Parameters
Type |
Name |
Description |
bool |
strict |
|
Returns
Type |
Description |
TDescriptor |
|
|
Edit this page
View Source
Verbatim(bool)
Whether the query should be treated as verbatim. A verbatim query will be serialized as part of the request,
irrespective
of whether it is Conditionless or not.
Declaration
public TDescriptor Verbatim(bool verbatim = true)
Parameters
Type |
Name |
Description |
bool |
verbatim |
|
Returns
Type |
Description |
TDescriptor |
|
Implements
Extension Methods