VectorSearchOptions.Builder Class

  • java.lang.Object
    • com.microsoft.semantickernel.data.vectorstorage.options.VectorSearchOptions.Builder

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
VectorSearchOptions build()

Builds a new instance of the VectorSearchOptions class.

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

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

Builder

public Builder()

Method Details

build

public VectorSearchOptions build()

Builds a new instance of the VectorSearchOptions class.

Returns:

a new instance of the VectorSearchOptions class

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:

this builder

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:

this builder

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:

this builder

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:

this builder

withVectorFieldName

public VectorSearchOptions.Builder withVectorFieldName(String vectorFieldName)

Sets the name of the vector field.

Parameters:

vectorFieldName - the name of the vector field

Returns:

this builder

withVectorSearchFilter

public VectorSearchOptions.Builder withVectorSearchFilter(VectorSearchFilter vectorSearchFilter)

Sets the vector search filter.

Parameters:

vectorSearchFilter - the vector search filter

Returns:

this builder

Applies to