Class ExplainDescriptor<TDocument>
Descriptor for Explain
https://opensearch.org/docs/latest/api-reference/explain/
Inheritance
ExplainDescriptor<TDocument>
Assembly: OpenSearch.Client.dll
Syntax
public class ExplainDescriptor<TDocument> : RequestDescriptorBase<ExplainDescriptor<TDocument>, ExplainRequestParameters, IExplainRequest<TDocument>>, IDescriptor, IExplainRequest<TDocument>, IExplainRequest, IRequest<ExplainRequestParameters>, IRequest where TDocument : class
Type Parameters
Name |
Description |
TDocument |
|
Constructors
|
Edit this page
View Source
ExplainDescriptor()
Used for serialization purposes, making sure we have a parameterless constructor
Declaration
protected ExplainDescriptor()
|
Edit this page
View Source
ExplainDescriptor(Id)
Declaration
public ExplainDescriptor(Id id)
Parameters
Type |
Name |
Description |
Id |
id |
this parameter is required
|
|
Edit this page
View Source
ExplainDescriptor(IndexName, Id)
Declaration
public ExplainDescriptor(IndexName index, Id id)
Parameters
Type |
Name |
Description |
IndexName |
index |
this parameter is required
|
Id |
id |
this parameter is required
|
|
Edit this page
View Source
ExplainDescriptor(TDocument, IndexName, Id)
Declaration
public ExplainDescriptor(TDocument documentWithId, IndexName index = null, Id id = null)
Parameters
Type |
Name |
Description |
TDocument |
documentWithId |
|
IndexName |
index |
|
Id |
id |
The document used to resolve the path from
|
Properties
|
Edit this page
View Source
HttpMethod
Declaration
protected override HttpMethod HttpMethod { get; }
Property Value
Overrides
Methods
|
Edit this page
View Source
AnalyzeWildcard(bool?)
If true
, wildcard and prefix queries are analyzed.
Declaration
public ExplainDescriptor<TDocument> AnalyzeWildcard(bool? analyzewildcard = true)
Parameters
Type |
Name |
Description |
bool? |
analyzewildcard |
|
Returns
|
Edit this page
View Source
Analyzer(string)
Analyzer to use for the query string. This parameter can only be used when the q
query string parameter is specified.
Declaration
public ExplainDescriptor<TDocument> Analyzer(string analyzer)
Parameters
Type |
Name |
Description |
string |
analyzer |
|
Returns
|
Edit this page
View Source
DefaultOperator(DefaultOperator?)
The default operator for query string query: AND
or OR
.
Declaration
public ExplainDescriptor<TDocument> DefaultOperator(DefaultOperator? defaultoperator)
Parameters
Returns
|
Edit this page
View Source
Df(string)
Field to use as default where no field prefix is given in the query string.
Declaration
public ExplainDescriptor<TDocument> Df(string df)
Parameters
Type |
Name |
Description |
string |
df |
|
Returns
|
Edit this page
View Source
Index(IndexName)
Index names used to limit the request. Only a single index name can be provided to this parameter.
Declaration
public ExplainDescriptor<TDocument> Index(IndexName index)
Parameters
Returns
|
Edit this page
View Source
Index<TOther>()
a shortcut into calling Index(typeof(TOther))
Declaration
public ExplainDescriptor<TDocument> Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Lenient(bool?)
If true
, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.
Declaration
public ExplainDescriptor<TDocument> Lenient(bool? lenient = true)
Parameters
Type |
Name |
Description |
bool? |
lenient |
|
Returns
|
Edit this page
View Source
Preference(string)
Specifies the node or shard the operation should be performed on. Random by default.
Declaration
public ExplainDescriptor<TDocument> Preference(string preference)
Parameters
Type |
Name |
Description |
string |
preference |
|
Returns
|
Edit this page
View Source
Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer>)
Declaration
public ExplainDescriptor<TDocument> Query(Func<QueryContainerDescriptor<TDocument>, QueryContainer> querySelector)
Parameters
Returns
|
Edit this page
View Source
QueryOnQueryString(string)
Query in the Lucene query string syntax.
Declaration
public ExplainDescriptor<TDocument> QueryOnQueryString(string queryonquerystring)
Parameters
Type |
Name |
Description |
string |
queryonquerystring |
|
Returns
|
Edit this page
View Source
Routing(Routing)
A document is routed to a particular shard in an index using the following formula
shard_num = hash(_routing) % num_primary_shards
OpenSearch will use the document id if not provided.
For requests that are constructed from/for a document OpenSearch.Client will automatically infer the routing key
if that document has a JoinField or a routing mapping on for its type exists on ConnectionSettings
Declaration
public ExplainDescriptor<TDocument> Routing(Routing routing)
Parameters
Type |
Name |
Description |
Routing |
routing |
|
Returns
|
Edit this page
View Source
SourceEnabled(bool?)
Whether the _source should be included in the response.
Declaration
public ExplainDescriptor<TDocument> SourceEnabled(bool? sourceenabled = true)
Parameters
Type |
Name |
Description |
bool? |
sourceenabled |
|
Returns
|
Edit this page
View Source
SourceExcludes(Fields)
A comma-separated list of source fields to exclude from the response.
Declaration
public ExplainDescriptor<TDocument> SourceExcludes(Fields sourceexcludes)
Parameters
Type |
Name |
Description |
Fields |
sourceexcludes |
|
Returns
|
Edit this page
View Source
SourceExcludes(params Expression<Func<TDocument, object>>[])
A comma-separated list of source fields to exclude from the response.
Declaration
public ExplainDescriptor<TDocument> SourceExcludes(params Expression<Func<TDocument, object>>[] fields)
Parameters
Returns
|
Edit this page
View Source
SourceIncludes(Fields)
A comma-separated list of source fields to include in the response.
Declaration
public ExplainDescriptor<TDocument> SourceIncludes(Fields sourceincludes)
Parameters
Type |
Name |
Description |
Fields |
sourceincludes |
|
Returns
|
Edit this page
View Source
SourceIncludes(params Expression<Func<TDocument, object>>[])
A comma-separated list of source fields to include in the response.
Declaration
public ExplainDescriptor<TDocument> SourceIncludes(params Expression<Func<TDocument, object>>[] fields)
Parameters
Returns
|
Edit this page
View Source
StoredFields(Fields)
Declaration
public ExplainDescriptor<TDocument> StoredFields(Fields fields)
Parameters
Type |
Name |
Description |
Fields |
fields |
|
Returns
|
Edit this page
View Source
StoredFields(Func<FieldsDescriptor<TDocument>, IPromise<Fields>>)
Allows to selectively load specific fields for each document
represented by a search hit. Defaults to load the internal _source field.
Declaration
public ExplainDescriptor<TDocument> StoredFields(Func<FieldsDescriptor<TDocument>, IPromise<Fields>> fields)
Parameters
Returns
Implements
Extension Methods