123456789_123456789_123456789_123456789_123456789_

Class: Redis::Commands::Search::Asc

Relationships & Source Files
Inherits: Object
Defined in: lib/redis/commands/modules/search/aggregation.rb

Overview

Wraps a field name with an ascending (+ASC+) sort order for AggregateRequest#sort_by.

Class Method Summary

Instance Attribute Summary

Constructor Details

.new(name) ⇒ Asc

Parameters:

  • name (String)

    the field name to sort ascending

[ GitHub ]

  
# File 'lib/redis/commands/modules/search/aggregation.rb', line 167

def initialize(name)
  @name = name
  @order = 'ASC'
end

Instance Attribute Details

#nameString (readonly)

Returns:

  • (String)

    the field name

  • (String)

    the order keyword, always "ASC"

[ GitHub ]

  
# File 'lib/redis/commands/modules/search/aggregation.rb', line 164

attr_reader :name, :order

#orderString (readonly)

Returns:

  • (String)

    the field name

  • (String)

    the order keyword, always "ASC"

[ GitHub ]

  
# File 'lib/redis/commands/modules/search/aggregation.rb', line 164

attr_reader :name, :order