Class KnnVectorPropertyDescriptor<T>
Inheritance
KnnVectorPropertyDescriptor<T>
Namespace: OpenSearch.Client
Assembly: OpenSearch.Client.dll
Syntax
public class KnnVectorPropertyDescriptor<T> : DocValuesPropertyDescriptorBase<KnnVectorPropertyDescriptor<T>, IKnnVectorProperty, T>, IDescriptor, IKnnVectorProperty, IDocValuesProperty, ICoreProperty, IProperty, IFieldMapping where T : class
Type Parameters
Constructors
|
Edit this page
View Source
KnnVectorPropertyDescriptor()
Declaration
public KnnVectorPropertyDescriptor()
Methods
|
Edit this page
View Source
CompressionLevel(string)
The compression level applied to the vector field (for example, 1x, 2x, 4x).
Higher compression reduces memory footprint at the cost of some search accuracy.
Declaration
public KnnVectorPropertyDescriptor<T> CompressionLevel(string compressionLevel)
Parameters
| Type |
Name |
Description |
| string |
compressionLevel |
|
Returns
|
Edit this page
View Source
DataType(string)
The data type of the vector elements. Defaults to float. Set to byte to store each
dimension as an 8-bit signed integer ([-128, 127]), or binary for binary vectors,
reducing memory and storage requirements.
Declaration
public KnnVectorPropertyDescriptor<T> DataType(string dataType)
Parameters
| Type |
Name |
Description |
| string |
dataType |
|
Returns
|
Edit this page
View Source
Dimension(int?)
The dimension of the vector.
Declaration
public KnnVectorPropertyDescriptor<T> Dimension(int? dimension)
Parameters
| Type |
Name |
Description |
| int? |
dimension |
|
Returns
|
Edit this page
View Source
Method(Func<KnnMethodDescriptor, IKnnMethod>)
The method to use when the underlying Approximate k-NN algorithm does not require training.
Declaration
public KnnVectorPropertyDescriptor<T> Method(Func<KnnMethodDescriptor, IKnnMethod> selector)
Parameters
Returns
|
Edit this page
View Source
Mode(string)
The mode that determines the default configuration of the vector field, balancing between
low latency and low cost (for example, in_memory or on_disk).
Declaration
public KnnVectorPropertyDescriptor<T> Mode(string mode)
Parameters
| Type |
Name |
Description |
| string |
mode |
|
Returns
|
Edit this page
View Source
ModelId(string)
The model to use when the underlying Approximate k-NN algorithm requires a training step.
Declaration
public KnnVectorPropertyDescriptor<T> ModelId(string modelId)
Parameters
| Type |
Name |
Description |
| string |
modelId |
|
Returns
|
Edit this page
View Source
SpaceType(string)
The vector space used to calculate the distance between vectors. Can be specified at the top level
of the field, as an alternative to specifying it on the Method.
Declaration
public KnnVectorPropertyDescriptor<T> SpaceType(string spaceType)
Parameters
| Type |
Name |
Description |
| string |
spaceType |
|
Returns
Implements
Extension Methods