Class VectorSearchOptions.Builder
- java.lang.Object
-
- com.microsoft.semantickernel.data.vectorstorage.options.VectorSearchOptions.Builder
-
- All Implemented Interfaces:
SemanticKernelBuilder<VectorSearchOptions>
- Enclosing class:
- VectorSearchOptions
public static class VectorSearchOptions.Builder extends Object implements SemanticKernelBuilder<VectorSearchOptions>
A builder for the VectorSearchOptions class.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VectorSearchOptionsbuild()Builds a new instance of the VectorSearchOptions class.VectorSearchOptions.BuilderwithIncludeTotalCount(boolean includeTotalCount)Sets a value indicating whether to include the total count of the results.VectorSearchOptions.BuilderwithIncludeVectors(boolean includeVectors)Sets a value indicating whether to include vectors in the results.VectorSearchOptions.BuilderwithSkip(int skip)Sets the offset of the results to return.VectorSearchOptions.BuilderwithTop(int top)Sets the limit of the number of results to return.VectorSearchOptions.BuilderwithVectorFieldName(String vectorFieldName)Sets the name of the vector field.VectorSearchOptions.BuilderwithVectorSearchFilter(VectorSearchFilter vectorSearchFilter)Sets the vector search filter.
-
-
-
Method Detail
-
withVectorSearchFilter
public VectorSearchOptions.Builder withVectorSearchFilter(VectorSearchFilter vectorSearchFilter)
Sets the vector search filter.- Parameters:
vectorSearchFilter- the vector search filter- Returns:
thisbuilder
-
withVectorFieldName
public VectorSearchOptions.Builder withVectorFieldName(String vectorFieldName)
Sets the name of the vector field.- Parameters:
vectorFieldName- the name of the vector field- Returns:
thisbuilder
-
withTop
public VectorSearchOptions.Builder withTop(int top)
Sets the limit of the number of results to return.- Parameters:
top- the limit of the number of results to return- Returns:
thisbuilder
-
withSkip
public VectorSearchOptions.Builder withSkip(int skip)
Sets the offset of the results to return.- Parameters:
skip- the offset of the results to return- Returns:
thisbuilder
-
withIncludeVectors
public VectorSearchOptions.Builder withIncludeVectors(boolean includeVectors)
Sets a value indicating whether to include vectors in the results.- Parameters:
includeVectors- a value indicating whether to include vectors in the results- Returns:
thisbuilder
-
withIncludeTotalCount
public VectorSearchOptions.Builder withIncludeTotalCount(boolean includeTotalCount)
Sets a value indicating whether to include the total count of the results.- Parameters:
includeTotalCount- a value indicating whether to include the total count of the results- Returns:
thisbuilder
-
build
public VectorSearchOptions build()
Builds a new instance of the VectorSearchOptions class.- Specified by:
buildin interfaceSemanticKernelBuilder<VectorSearchOptions>- Returns:
- a new instance of the VectorSearchOptions class
-
-