VectorSearchOptions Class
- java.
lang. Object - com.
microsoft. semantickernel. data. vectorstorage. options. VectorSearchOptions
- com.
public class VectorSearchOptions
Options for a vector search.
Field Summary
| Modifier and Type | Field and Description |
|---|---|
| static final int |
DEFAULT_TOP
The default limit of the number of results to return. |
Constructor Summary
| Constructor | Description |
|---|---|
| VectorSearchOptions(VectorSearchFilter vectorSearchFilter, String vectorFieldName, int top, int skip, boolean includeVectors, boolean includeTotalCount) |
Creates a new instance of the Vector |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static Builder |
builder()
Creates a new instance of the Builder class. |
|
static
Vector |
createDefault(String vectorFieldName)
Creates a new instance of the Vector |
| int |
getSkip()
Gets the offset of the results to return. |
| int |
getTop()
Gets the limit of the number of results to return. |
| java.lang.String |
getVectorFieldName()
Gets the name of the vector field. |
|
Vector |
getVectorSearchFilter()
Gets the vector search filter. |
| boolean |
isIncludeTotalCount()
Gets a value indicating whether to include the total count of the results. |
| boolean |
isIncludeVectors()
Gets a value indicating whether to include vectors in the results. |
Methods inherited from java.lang.Object
Field Details
DEFAULT_TOP
public static final int DEFAULT_TOP
The default limit of the number of results to return.
Constructor Details
VectorSearchOptions
public VectorSearchOptions(VectorSearchFilter vectorSearchFilter, String vectorFieldName, int top, int skip, boolean includeVectors, boolean includeTotalCount)
Creates a new instance of the VectorSearchOptions class.
Parameters:
Method Details
builder
public static VectorSearchOptions.Builder builder()
Creates a new instance of the Builder class.
Returns:
createDefault
public static VectorSearchOptions createDefault(String vectorFieldName)
Creates a new instance of the VectorSearchOptions class with default values.
Parameters:
Returns:
getSkip
public int getSkip()
Gets the offset of the results to return.
Returns:
getTop
public int getTop()
Gets the limit of the number of results to return.
Returns:
getVectorFieldName
public String getVectorFieldName()
Gets the name of the vector field.
Returns:
getVectorSearchFilter
public VectorSearchFilter getVectorSearchFilter()
Gets the vector search filter.
Returns:
isIncludeTotalCount
public boolean isIncludeTotalCount()
Gets a value indicating whether to include the total count of the results.
Returns:
isIncludeVectors
public boolean isIncludeVectors()
Gets a value indicating whether to include vectors in the results.
Returns: