io.milvus.param.dml

## Class HybridSearchParam.Builder

- java.lang.Object
- - io.milvus.param.dml.HybridSearchParam.Builder

- Enclosing class:
    HybridSearchParam

      public static class HybridSearchParam.Builder
      extends java.lang.Object

  Builder for `SearchParam` class.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `HybridSearchParam.Builder` | `addOutField(@NonNull java.lang.String fieldName)` Specifies an output field (Optional).
    `HybridSearchParam.Builder` | `addPartitionName(@NonNull java.lang.String partitionName)` Adds a partition to specify search scope (Optional).
    `HybridSearchParam.Builder` | `addSearchRequest(@NonNull AnnSearchParam searchParam)` Adds a vector search request for a vector field.
    `HybridSearchParam` | `build()` Verifies parameters and creates a new `HybridSearchParam` instance.
    `HybridSearchParam.Builder` | `withCollectionName(@NonNull java.lang.String collectionName)` Sets the collection name.
    `HybridSearchParam.Builder` | `withConsistencyLevel(ConsistencyLevelEnum consistencyLevel)` ConsistencyLevel of consistency level.
    `HybridSearchParam.Builder` | `withDatabaseName(java.lang.String databaseName)` Sets the database name.
    `HybridSearchParam.Builder` | `withOutFields(@NonNull java.util.List<java.lang.String> outFields)` Specifies output fields (Optional).
    `HybridSearchParam.Builder` | `withPartitionNames(@NonNull java.util.List<java.lang.String> partitionNames)` Sets partition names list to specify search scope (Optional).
    `HybridSearchParam.Builder` | `withRanker(@NonNull BaseRanker ranker)` Set a ranker for rearranging number of limit results.
    `HybridSearchParam.Builder` | `withRoundDecimal(@NonNull java.lang.Integer decimal)` Specifies the decimal place of the returned results.
    `HybridSearchParam.Builder` | `withTopK(@NonNull java.lang.Integer topK)` Sets topK value of ANN search.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### withDatabaseName

          public HybridSearchParam.Builder withDatabaseName(java.lang.String databaseName)

      Sets the database name. database name can be nil.
      Parameters:
        `databaseName` - database name
      Returns:
        `Builder`

    - #### withCollectionName

          public HybridSearchParam.Builder withCollectionName(@NonNull
                                                              @NonNull java.lang.String collectionName)

      Sets the collection name. Collection name cannot be empty or null.
      Parameters:
        `collectionName` - collection name
      Returns:
        `Builder`

    - #### withPartitionNames

          public HybridSearchParam.Builder withPartitionNames(@NonNull
                                                              @NonNull java.util.List<java.lang.String> partitionNames)

      Sets partition names list to specify search scope (Optional).
      Parameters:
        `partitionNames` - partition names list
      Returns:
        `Builder`

    - #### addPartitionName

          public HybridSearchParam.Builder addPartitionName(@NonNull
                                                            @NonNull java.lang.String partitionName)

      Adds a partition to specify search scope (Optional).
      Parameters:
        `partitionName` - partition name
      Returns:
        `Builder`

    - #### addSearchRequest

          public HybridSearchParam.Builder addSearchRequest(@NonNull
                                                            @NonNull AnnSearchParam searchParam)

      Adds a vector search request for a vector field.
      Parameters:
        `searchParam` - vector search request
      Returns:
        `Builder`

    - #### withRanker

          public HybridSearchParam.Builder withRanker(@NonNull
                                                      @NonNull 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

          public HybridSearchParam.Builder withTopK(@NonNull
                                                    @NonNull java.lang.Integer topK)

      Sets topK value of ANN search.
      Parameters:
        `topK` - topK value
      Returns:
        `Builder`

    - #### withOutFields

          public HybridSearchParam.Builder withOutFields(@NonNull
                                                         @NonNull java.util.List<java.lang.String> outFields)

      Specifies output fields (Optional).
      Parameters:
        `outFields` - output fields
      Returns:
        `Builder`

    - #### addOutField

          public HybridSearchParam.Builder addOutField(@NonNull
                                                       @NonNull java.lang.String fieldName)

      Specifies an output field (Optional).
      Parameters:
        `fieldName` - filed name
      Returns:
        `Builder`

    - #### withRoundDecimal

          public HybridSearchParam.Builder withRoundDecimal(@NonNull
                                                            @NonNull java.lang.Integer decimal)

      Specifies the decimal place of the returned results.
      Parameters:
        `decimal` - how many digits after the decimal point
      Returns:
        `Builder`

    - #### build

          public HybridSearchParam build()
                                  throws ParamException

      Verifies parameters and creates a new `HybridSearchParam` instance.
      Returns:
        `HybridSearchParam`
      Throws:
        `ParamException`