Class VectorSearchOptions


  • public class VectorSearchOptions
    extends Object
    Options for a vector search.
    • 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.