Class VectorSearchOptions
- java.lang.Object
-
- com.microsoft.semantickernel.data.vectorstorage.options.VectorSearchOptions
-
public class VectorSearchOptions extends Object
Options for a vector search.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVectorSearchOptions.BuilderA builder for the VectorSearchOptions class.
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_TOPThe default limit of the number of results to return.
-
Constructor Summary
Constructors Constructor Description VectorSearchOptions(VectorSearchFilter vectorSearchFilter, String vectorFieldName, int top, int skip, boolean includeVectors, boolean includeTotalCount)Creates a new instance of the VectorSearchOptions class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VectorSearchOptions.Builderbuilder()Creates a new instance of the Builder class.static VectorSearchOptionscreateDefault(String vectorFieldName)Creates a new instance of the VectorSearchOptions class with default values.intgetSkip()Gets the offset of the results to return.intgetTop()Gets the limit of the number of results to return.StringgetVectorFieldName()Gets the name of the vector field.VectorSearchFiltergetVectorSearchFilter()Gets the vector search filter.booleanisIncludeTotalCount()Gets a value indicating whether to include the total count of the results.booleanisIncludeVectors()Gets a value indicating whether to include vectors in the results.
-
-
-
Field Detail
-
DEFAULT_TOP
public static final int DEFAULT_TOP
The default limit of the number of results to return.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
VectorSearchOptions
public VectorSearchOptions(VectorSearchFilter vectorSearchFilter, String vectorFieldName, int top, int skip, boolean includeVectors, boolean includeTotalCount)
Creates a new instance of the VectorSearchOptions class.- Parameters:
vectorSearchFilter- The vector search filter.vectorFieldName- The name of the vector field.top- The limit of the number of results to return.skip- The offset of the results to return.includeVectors- A value indicating whether to include vectors in the results.includeTotalCount- A value indicating whether to include the total count of the results.
-
-
Method Detail
-
createDefault
public static VectorSearchOptions createDefault(String vectorFieldName)
Creates a new instance of the VectorSearchOptions class with default values.- Parameters:
vectorFieldName- The name of the vector field.- Returns:
- A new instance of the VectorSearchOptions class with default values.
-
getVectorSearchFilter
@Nullable public VectorSearchFilter getVectorSearchFilter()
Gets the vector search filter.- Returns:
- The vector search filter.
-
getVectorFieldName
@Nullable public String getVectorFieldName()
Gets the name of the vector field.- Returns:
- The name of the vector field.
-
getTop
public int getTop()
Gets the limit of the number of results to return.- Returns:
- The limit of the number of results to return.
-
getSkip
public int getSkip()
Gets the offset of the results to return.- Returns:
- The offset of the results to return.
-
isIncludeVectors
public boolean isIncludeVectors()
Gets a value indicating whether to include vectors in the results.- Returns:
- A value indicating whether to include vectors in the results.
-
isIncludeTotalCount
public boolean isIncludeTotalCount()
Gets a value indicating whether to include the total count of the results.- Returns:
- A value indicating whether to include the total count of the results.
-
builder
public static VectorSearchOptions.Builder builder()
Creates a new instance of the Builder class.- Returns:
- A new instance of the Builder class.
-
-