lib/redi_search_rails.rb
# will configure the RediSearch for the specific model
#
# @see https://github.com/dmitrypol/redi_search_rails
# @param schema [Hash]  name: 'TEXT', age: 'NUMERIC'
will configure the RediSearch for the specific model
will configure the RediSearch for the specific model
def redi_search_schema(schema)
      @schema = schema.to_a.flatten
      @fields = schema.keys
      @model = self.name.constantize
      @index_name = @model.to_s
      @score = 1
    end
def redi_search_schema ( schema ) @schema = schema . to_a . flatten @fields = schema . keys @model = self . name . constantize @index_name = @model . to_s @score = 1 end
will configure the RediSearch for the specific model
will configure the RediSearch for the specific model
schema
'TEXT', age: 'NUMERIC'
' TEXT ' age : ' NUMERIC '
see
None