Class: Redis::Commands::Search::HybridCursorQuery
- Inherits:
-
Object
- Object
- Redis::Commands::Search::HybridCursorQuery
- Defined in:
- lib/redis/commands/modules/search/hybrid.rb
Overview
The WITHCURSOR clause for paging through FT.HYBRID results.
Instance Method Summary collapse
-
#build_args ⇒ Array<String>
Render the cursor arguments.
-
#initialize(count: 0, max_idle: 0) ⇒ HybridCursorQuery
constructor
A new instance of HybridCursorQuery.
Constructor Details
#initialize(count: 0, max_idle: 0) ⇒ HybridCursorQuery
Returns a new instance of HybridCursorQuery.
330 331 332 333 |
# File 'lib/redis/commands/modules/search/hybrid.rb', line 330 def initialize(count: 0, max_idle: 0) @count = count @max_idle = max_idle end |
Instance Method Details
#build_args ⇒ Array<String>
Render the cursor arguments.
338 339 340 341 342 343 |
# File 'lib/redis/commands/modules/search/hybrid.rb', line 338 def build_args args = ["WITHCURSOR"] args.concat(["COUNT", @count.to_s]) if @count > 0 args.concat(["MAXIDLE", @max_idle.to_s]) if @max_idle > 0 args end |