Class: Redis::Commands::Search::HybridCursorQuery
- Inherits:
-
Object
- Object
- Redis::Commands::Search::HybridCursorQuery
- Defined in:
- lib/redis/commands/modules/search/hybrid.rb
Overview
Note:
Only honored by Redis 8.4 through 8.10. Redis 8.11 and later reject the clause with a command error, as it was never part of the documented FT.HYBRID surface.
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.
333 334 335 336 |
# File 'lib/redis/commands/modules/search/hybrid.rb', line 333 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.
341 342 343 344 345 346 |
# File 'lib/redis/commands/modules/search/hybrid.rb', line 341 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 |