Class QueryParam.Builder

    • Method Detail

      • withCollectionName

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

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

        public QueryParam.Builder withPartitionNames​(@NonNull
                                                     @NonNull List<String> partitionNames)
        Sets partition names list to specify query scope (Optional).
        Parameters:
        partitionNames - partition names list
        Returns:
        Builder
      • withGracefulTime

        @Deprecated
        public QueryParam.Builder withGracefulTime​(Long gracefulTime)
        Deprecated.
        Graceful time for BOUNDED Consistency Level Note: This parameter is deprecated from Milvus v2.2.9, user only input consistency level to search. The time settings of different consistency levels are determined by the server side. For this reason, this method is marked as Deprecated in Java SDK v2.2.11
        Parameters:
        gracefulTime - graceful time
        Returns:
        Builder
      • addPartitionName

        public QueryParam.Builder addPartitionName​(@NonNull
                                                   @NonNull String partitionName)
        Adds a partition to specify query scope (Optional).
        Parameters:
        partitionName - partition name
        Returns:
        Builder
      • withOutFields

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

        public QueryParam.Builder addOutField​(@NonNull
                                              @NonNull String fieldName)
        Specifies an output field (Optional).
        Parameters:
        fieldName - field name
        Returns:
        Builder
      • withTravelTimestamp

        public QueryParam.Builder withTravelTimestamp​(@NonNull
                                                      @NonNull Long ts)
        Specify an absolute timestamp in a query to get results based on a data view at a specified point in time. Default value is 0, server executes query on a full data view.
        Parameters:
        ts - a timestamp value
        Returns:
        Builder
      • withGuaranteeTimestamp

        @Deprecated
        public QueryParam.Builder withGuaranteeTimestamp​(@NonNull
                                                         @NonNull Long ts)
        Deprecated.
        Instructs server to see insert/delete operations performed before a provided timestamp. If no such timestamp is specified, the server will wait for the latest operation to finish and query. Note: The timestamp is not an absolute timestamp, it is a hybrid value combined by UTC time and internal flags. We call it TSO, for more information please refer to: https://github.com/milvus-io/milvus/blob/master/docs/design_docs/milvus_hybrid_ts_en.md You can get a TSO from insert/delete operations, see the MutationResultWrapper class. Use an operation's TSO to set this parameter, the server will execute query after this operation is finished. Default value is GUARANTEE_EVENTUALLY_TS, query executes query immediately. Note: This parameter is deprecated from Milvus v2.2.9, user only input consistency level to search. The time settings of different consistency levels are determined by the server side. For this reason, this method is marked as Deprecated in Java SDK v2.2.11
        Parameters:
        ts - a timestamp value
        Returns:
        Builder
      • withOffset

        public QueryParam.Builder withOffset​(@NonNull
                                             @NonNull 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 QueryParam.Builder withLimit​(@NonNull
                                            @NonNull Long limit)
        Specify a value to control the returned number of entities. Must be a positive value. Default value is 0, will return without limit.
        Parameters:
        limit - a value to define the limit of returned entities
        Returns:
        Builder
      • withIgnoreGrowing

        public QueryParam.Builder withIgnoreGrowing​(@NonNull
                                                    @NonNull Boolean ignoreGrowing)
        Ignore the growing segments to get best query performance. Default is False. For the user case that don't require data visibility.
        Parameters:
        ignoreGrowing - Boolean.TRUE ignore, Boolean.FALSE is not
        Returns:
        Builder