VectorSearchOptions.Builder Class
- java.
lang. Object - com.
microsoft. semantickernel. data. vectorstorage. options. VectorSearchOptions. Builder
- com.
Implements
public static class VectorSearchOptions.Builder
implements SemanticKernelBuilder<VectorSearchOptions>
A builder for the VectorSearchOptions class.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| Builder() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
Vector |
build()
Builds a new instance of the Vector |
| Builder |
withIncludeTotalCount(boolean includeTotalCount)
Sets a value indicating whether to include the total count of the results. |
| Builder |
withIncludeVectors(boolean includeVectors)
Sets a value indicating whether to include vectors in the results. |
| Builder |
withSkip(int skip)
Sets the offset of the results to return. |
| Builder |
withTop(int top)
Sets the limit of the number of results to return. |
| Builder |
withVectorFieldName(String vectorFieldName)
Sets the name of the vector field. |
| Builder |
withVectorSearchFilter(VectorSearchFilter vectorSearchFilter)
Sets the vector search filter. |
Methods inherited from java.lang.Object
Constructor Details
Builder
public Builder()
Method Details
build
public VectorSearchOptions build()
Builds a new instance of the VectorSearchOptions class.
Returns:
withIncludeTotalCount
public VectorSearchOptions.Builder withIncludeTotalCount(boolean includeTotalCount)
Sets a value indicating whether to include the total count of the results.
Parameters:
Returns:
this builderwithIncludeVectors
public VectorSearchOptions.Builder withIncludeVectors(boolean includeVectors)
Sets a value indicating whether to include vectors in the results.
Parameters:
Returns:
this builderwithSkip
public VectorSearchOptions.Builder withSkip(int skip)
Sets the offset of the results to return.
Parameters:
Returns:
this builderwithTop
public VectorSearchOptions.Builder withTop(int top)
Sets the limit of the number of results to return.
Parameters:
Returns:
this builderwithVectorFieldName
public VectorSearchOptions.Builder withVectorFieldName(String vectorFieldName)
Sets the name of the vector field.
Parameters:
Returns:
this builderwithVectorSearchFilter
public VectorSearchOptions.Builder withVectorSearchFilter(VectorSearchFilter vectorSearchFilter)
Sets the vector search filter.
Parameters:
Returns:
this builder