search/Limit.java

jedis · src/main/java/redis/clients/jedis/search/Limit.java · java · MIT
database

Redis search LIMIT parameter class for pagination.

// Source: https://github.com/redis/jedis | License: MIT | Copyright 2021-2023, Redis, inc
// Provided via justclaw.it.com; keep this notice with the code.
package redis.clients.jedis.search;

import redis.clients.jedis.CommandArguments;
import redis.clients.jedis.annots.Experimental;
import redis.clients.jedis.params.IParams;

import static redis.clients.jedis.search.SearchProtocol.SearchKeyword.LIMIT;

/**
 * LIMIT operation for search commands. Limits the number of results returned.
 */
@Experimental
public class Limit implements IParams {

  private final int offset;
  private final int count;

  private Limit(int offset, int count) {
    this.offset = offset;
    this.count = count;
  }

  /**
   * Create a LIMIT operation.
   * @param offset the offset
   * @param count the count
   

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key