Package io.milvus.param.highlevel.dml

## Class SearchSimpleParam.Builder

- java.lang.Object
- - io.milvus.param.highlevel.dml.SearchSimpleParam.Builder

- Enclosing class:
    SearchSimpleParam

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

  Builder for `SearchSimpleParam` class.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `SearchSimpleParam` | `build()` | Verifies parameters and creates a new `SearchSimpleParam` instance.
    `SearchSimpleParam.Builder` | `withCollectionName​(@NonNull java.lang.String collectionName)` | Sets the collection name.
    `SearchSimpleParam.Builder` | `withConsistencyLevel​(ConsistencyLevelEnum consistencyLevel)` | ConsistencyLevel of consistency level.
    `SearchSimpleParam.Builder` | `withFilter​(@NonNull java.lang.String filter)` | Sets expression to filter out entities before searching (Optional).
    `SearchSimpleParam.Builder` | `withLimit​(@NonNull java.lang.Long limit)` | Specify a value to control the returned number of entities.
    `SearchSimpleParam.Builder` | `withOffset​(@NonNull java.lang.Long offset)` | Specify a position to return results.
    `SearchSimpleParam.Builder` | `withOutputFields​(@NonNull java.util.List<java.lang.String> outputFields)` | Specifies output fields (Optional).
    `SearchSimpleParam.Builder` | `withVectors​(@NonNull java.util.List<?> vectors)` | Sets the target vectors.

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

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

- - ### Method Detail

    - #### withCollectionName

          public SearchSimpleParam.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`

    - #### withFilter

          public SearchSimpleParam.Builder withFilter​(@NonNull
                                                      @NonNull java.lang.String filter)

      Sets expression to filter out entities before searching (Optional).
      Parameters:
        `filter` - filtering expression
      Returns:
        `Builder`
      See Also:
        Boolean Expression Rules

    - #### withOutputFields

          public SearchSimpleParam.Builder withOutputFields​(@NonNull
                                                            @NonNull java.util.List<java.lang.String> outputFields)

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

    - #### withVectors

          public SearchSimpleParam.Builder withVectors​(@NonNull
                                                       @NonNull java.util.List<?> vectors)

      Sets the target vectors.
      Parameters:
        `vectors` - list of target vectors: if vector type is FloatVector, vectors is List of List Float; if vector type is BinaryVector, vectors is List of ByteBuffer;
      Returns:
        `Builder`

    - #### withOffset

          public SearchSimpleParam.Builder withOffset​(@NonNull
                                                      @NonNull java.lang.Long offset)

      Specify a position to return results. Only take effect when the 'limit' value is specified. Default value is 0, start from begin.
      Parameters:
        `offset` - a value to define the position
      Returns:
        `Builder`

    - #### withLimit

          public SearchSimpleParam.Builder withLimit​(@NonNull
                                                     @NonNull java.lang.Long limit)

      Specify a value to control the returned number of entities. Must be a positive value. Default value is 10, will return without limit. To maintain consistency with the parameter type of the query interface, the field is declared as Long. In reality, the field is of type int.
      Parameters:
        `limit` - a value to define the limit of returned entities
      Returns:
        `Builder`

    - #### withConsistencyLevel

          public SearchSimpleParam.Builder withConsistencyLevel​(ConsistencyLevelEnum consistencyLevel)

      ConsistencyLevel of consistency level.
      Parameters:
        `consistencyLevel` - consistency level
      Returns:
        `Builder`

    - #### build

          public SearchSimpleParam build()
                                  throws ParamException

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