Class TermVectorsDescriptor<TDocument>
Descriptor for TermVectors
https://opensearch.org/docs/latest
Inheritance
TermVectorsDescriptor<TDocument>
Assembly: OpenSearch.Client.dll
Syntax
public class TermVectorsDescriptor<TDocument> : RequestDescriptorBase<TermVectorsDescriptor<TDocument>, TermVectorsRequestParameters, ITermVectorsRequest<TDocument>>, IDescriptor, ITermVectorsRequest<TDocument>, IRequest<TermVectorsRequestParameters>, IRequest where TDocument : class
Type Parameters
Name |
Description |
TDocument |
|
Constructors
|
Edit this page
View Source
TermVectorsDescriptor()
Declaration
public TermVectorsDescriptor()
|
Edit this page
View Source
TermVectorsDescriptor(Id)
/{index}/_termvectors/{id}
Declaration
public TermVectorsDescriptor(Id id)
Parameters
Type |
Name |
Description |
Id |
id |
Optional, accepts null
|
|
Edit this page
View Source
TermVectorsDescriptor(IndexName)
Declaration
public TermVectorsDescriptor(IndexName index)
Parameters
Type |
Name |
Description |
IndexName |
index |
this parameter is required
|
|
Edit this page
View Source
TermVectorsDescriptor(IndexName, Id)
/{index}/_termvectors/{id}
Declaration
public TermVectorsDescriptor(IndexName index, Id id)
Parameters
Type |
Name |
Description |
IndexName |
index |
this parameter is required
|
Id |
id |
Optional, accepts null
|
|
Edit this page
View Source
TermVectorsDescriptor(TDocument, IndexName, Id)
/{index}/_termvectors/{id}
Declaration
public TermVectorsDescriptor(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
|
Methods
|
Edit this page
View Source
Document(TDocument)
An optional document to get term vectors for instead of using an already indexed document
Declaration
public TermVectorsDescriptor<TDocument> Document(TDocument document)
Parameters
Type |
Name |
Description |
TDocument |
document |
|
Returns
|
Edit this page
View Source
FieldStatistics(bool?)
If true
, the response includes the document count, sum of document frequencies, and sum of total term frequencies.
Declaration
public TermVectorsDescriptor<TDocument> FieldStatistics(bool? fieldstatistics = true)
Parameters
Type |
Name |
Description |
bool? |
fieldstatistics |
|
Returns
|
Edit this page
View Source
Fields(Fields)
Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the completion_fields
or fielddata_fields
parameters.
Declaration
public TermVectorsDescriptor<TDocument> Fields(Fields fields)
Parameters
Type |
Name |
Description |
Fields |
fields |
|
Returns
|
Edit this page
View Source
Fields(params Expression<Func<TDocument, object>>[])
Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the completion_fields
or fielddata_fields
parameters.
Declaration
public TermVectorsDescriptor<TDocument> Fields(params Expression<Func<TDocument, object>>[] fields)
Parameters
Returns
|
Edit this page
View Source
Filter(Func<TermVectorFilterDescriptor, ITermVectorFilter>)
Filter the terms returned based on their TF-IDF scores.
This can be useful in order find out a good characteristic vector of a document.
Declaration
public TermVectorsDescriptor<TDocument> Filter(Func<TermVectorFilterDescriptor, ITermVectorFilter> filterSelector)
Parameters
Returns
|
Edit this page
View Source
Id(Id)
Unique identifier of the document.
Declaration
public TermVectorsDescriptor<TDocument> Id(Id id)
Parameters
Type |
Name |
Description |
Id |
id |
|
Returns
|
Edit this page
View Source
Index(IndexName)
Name of the index that contains the document.
Declaration
public TermVectorsDescriptor<TDocument> Index(IndexName index)
Parameters
Returns
|
Edit this page
View Source
Index<TOther>()
a shortcut into calling Index(typeof(TOther))
Declaration
public TermVectorsDescriptor<TDocument> Index<TOther>() where TOther : class
Returns
Type Parameters
|
Edit this page
View Source
Offsets(bool?)
If true
, the response includes term offsets.
Declaration
public TermVectorsDescriptor<TDocument> Offsets(bool? offsets = true)
Parameters
Type |
Name |
Description |
bool? |
offsets |
|
Returns
|
Edit this page
View Source
Payloads(bool?)
If true
, the response includes term payloads.
Declaration
public TermVectorsDescriptor<TDocument> Payloads(bool? payloads = true)
Parameters
Type |
Name |
Description |
bool? |
payloads |
|
Returns
|
Edit this page
View Source
PerFieldAnalyzer(Func<PerFieldAnalyzerDescriptor<TDocument>, IPromise<IPerFieldAnalyzer>>)
Provide a different analyzer than the one at the field.
This is useful in order to generate term vectors in any fashion, especially when using artificial documents.
Declaration
public TermVectorsDescriptor<TDocument> PerFieldAnalyzer(Func<PerFieldAnalyzerDescriptor<TDocument>, IPromise<IPerFieldAnalyzer>> analyzerSelector)
Parameters
Returns
|
Edit this page
View Source
Positions(bool?)
If true
, the response includes term positions.
Declaration
public TermVectorsDescriptor<TDocument> Positions(bool? positions = true)
Parameters
Type |
Name |
Description |
bool? |
positions |
|
Returns
|
Edit this page
View Source
Preference(string)
Specifies the node or shard the operation should be performed on. Random by default.
Declaration
public TermVectorsDescriptor<TDocument> Preference(string preference)
Parameters
Type |
Name |
Description |
string |
preference |
|
Returns
|
Edit this page
View Source
Realtime(bool?)
If true
, the request is real-time as opposed to near-real-time.
Declaration
public TermVectorsDescriptor<TDocument> Realtime(bool? realtime = true)
Parameters
Type |
Name |
Description |
bool? |
realtime |
|
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 TermVectorsDescriptor<TDocument> Routing(Routing routing)
Parameters
Type |
Name |
Description |
Routing |
routing |
|
Returns
|
Edit this page
View Source
TermStatistics(bool?)
If true
, the response includes term frequency and document frequency.
Declaration
public TermVectorsDescriptor<TDocument> TermStatistics(bool? termstatistics = true)
Parameters
Type |
Name |
Description |
bool? |
termstatistics |
|
Returns
|
Edit this page
View Source
Version(long?)
If true
, returns the document version as part of a hit.
Declaration
public TermVectorsDescriptor<TDocument> Version(long? version)
Parameters
Type |
Name |
Description |
long? |
version |
|
Returns
|
Edit this page
View Source
VersionType(VersionType?)
Declaration
public TermVectorsDescriptor<TDocument> VersionType(VersionType? versiontype)
Parameters
Returns
Implements
Extension Methods