Class HybridSearchParam.Builder

    • Method Detail

      • withDatabaseName

        public HybridSearchParam.Builder withDatabaseName​(String databaseName)
        Sets the database name. database name can be nil.
        Parameters:
        databaseName - database name
        Returns:
        Builder
      • withCollectionName

        public HybridSearchParam.Builder withCollectionName​(String collectionName)
        Sets the collection name. Collection name cannot be empty or null.
        Parameters:
        collectionName - collection name
        Returns:
        Builder
      • withPartitionNames

        public HybridSearchParam.Builder withPartitionNames​(List<String> partitionNames)
        Sets partition names list to specify search scope (Optional).
        Parameters:
        partitionNames - partition names list
        Returns:
        Builder
      • addPartitionName

        public HybridSearchParam.Builder addPartitionName​(String partitionName)
        Adds a partition to specify search scope (Optional).
        Parameters:
        partitionName - partition name
        Returns:
        Builder
      • addSearchRequest

        public HybridSearchParam.Builder addSearchRequest​(AnnSearchParam searchParam)
        Adds a vector search request for a vector field.
        Parameters:
        searchParam - vector search request
        Returns:
        Builder
      • withRanker

        public HybridSearchParam.Builder withRanker​(BaseRanker ranker)
        Set a ranker for rearranging number of limit results.
        Parameters:
        ranker - concrete ranker object
        Returns:
        Builder
      • withConsistencyLevel

        public HybridSearchParam.Builder withConsistencyLevel​(ConsistencyLevelEnum consistencyLevel)
        ConsistencyLevel of consistency level.
        Parameters:
        consistencyLevel - consistency level
        Returns:
        Builder
      • withTopK

        @Deprecated
        public HybridSearchParam.Builder withTopK​(Integer topK)
        Deprecated.
        Sets topK value of ANN search. withTopK() is deprecated, replaced by withLimit()
        Parameters:
        topK - topK value
        Returns:
        Builder
      • withOutFields

        public HybridSearchParam.Builder withOutFields​(List<String> outFields)
        Specifies output fields (Optional).
        Parameters:
        outFields - output fields
        Returns:
        Builder
      • addOutField

        public HybridSearchParam.Builder addOutField​(String fieldName)
        Specifies an output field (Optional).
        Parameters:
        fieldName - filed name
        Returns:
        Builder
      • withOffset

        public HybridSearchParam.Builder withOffset​(Long offset)
        Specifies the offset place of the returned results.
        Parameters:
        offset - the offset position
        Returns:
        Builder
      • withRoundDecimal

        public HybridSearchParam.Builder withRoundDecimal​(Integer decimal)
        Specifies the decimal place of the returned results.
        Parameters:
        decimal - how many digits after the decimal point
        Returns:
        Builder
      • withGroupByFieldName

        public HybridSearchParam.Builder withGroupByFieldName​(String groupByFieldName)
        Groups the results by a scalar field name.
        Parameters:
        groupByFieldName - a scalar field name
        Returns:
        Builder
      • withGroupSize

        public HybridSearchParam.Builder withGroupSize​(Integer groupSize)
        Defines the max number of items for each group, the value must greater than zero.
        Parameters:
        groupSize - the max number of items
        Returns:
        Builder
      • withStrictGroupSize

        public HybridSearchParam.Builder withStrictGroupSize​(Boolean strictGroupSize)
        Whether to force the number of each group to be groupSize. Set to false, milvus might return some groups with number of items less than groupSize.
        Parameters:
        strictGroupSize - whether to force the number of each group to be groupSize
        Returns:
        Builder