Class Cursor.Builder

  • Enclosing class:
    Cursor

    public static final class Cursor.Builder
    extends Object
    A builder which constructs Cursor objects.
    • Method Detail

      • setPerResult

        public Cursor.Builder setPerResult​(boolean perResult)
        Sets whether or not to return a Cursor on each individual result in Results or a single cursor with all Results.
        Parameters:
        perResult - if True, then return a Cursor with each ScoredDocument result, otherwise return a single Cursor with Results
        Returns:
        this Builder
      • build

        public Cursor build​(String webSafeString)
        Construct the final message.
        Parameters:
        webSafeString - use a cursor returned from a previous set of search results as a starting point to retrieve the next set of results. This can get you better performance, and also improves the consistency of pagination through index updates
        Returns:
        the Cursor built from the parameters entered on this Builder
        Throws:
        IllegalArgumentException - if the cursor string is invalid
      • build

        public Cursor build()
        Construct the final message.
        Returns:
        the Cursor built from the parameters entered on this Builder