Class ScanType

    • Constructor Detail

      • ScanType

        public ScanType()
    • Method Detail

      • rangeScan

        public static RangeScan rangeScan()
        Specifies a range scan that includes all documents in the collection.
        Returns:
        a newly created RangeScan to be passed into the Collection API.
      • rangeScan

        public static RangeScan rangeScan​(@Nullable
                                          ScanTerm from,
                                          @Nullable
                                          ScanTerm to)
        Specifies a range scan that includes all documents whose IDs are between two ScanTerms.
        Parameters:
        from - the start of the range, or null for unbounded
        to - the end of the range, or null for unbounded
        Returns:
        a newly created RangeScan to be passed into the Collection API.
      • prefixScan

        public static PrefixScan prefixScan​(String documentIdPrefix)
        Specifies a range scan that includes all documents whose IDs start with the given prefix.
        Returns:
        a newly created RangeScan to be passed into the Collection API.
      • samplingScan

        public static SamplingScan samplingScan​(long limit)
        Creates a new KV sampling scan, which randomly selects documents up until the configured limit, with a random seed.
        Parameters:
        limit - the number of documents to limit sampling to.
        Returns:
        a newly created RangeScan to be passed into the Collection API.
      • samplingScan

        public static SamplingScan samplingScan​(long limit,
                                                long seed)
        Creates a new KV sampling scan, which randomly selects documents up until the configured limit, with the specified seed.
        Parameters:
        limit - the number of documents to limit sampling to.
        seed - seed for the random number generator that selects the documents. CAVEAT: Specifying the same seed does not guarantee the same documents are selected.
        Returns:
        a newly created RangeScan to be passed into the Collection API.