Class: Redis::Commands::Search::TagField
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Field
|
|
|
Instance Chain:
self,
Field
|
|
| Inherits: |
Redis::Commands::Search::Field
|
| Defined in: | lib/redis/commands/modules/search/field.rb |
Overview
A TAG field, indexing one or more delimited tag tokens.
Class Method Summary
-
.new(name, query = nil, **options) ⇒ TagField
constructor
Build a
TAGfield.
Field - Inherited
| .new | Build a field definition. |
Instance Attribute Summary
Instance Method Summary
-
#eq(value) ⇒ Query
Add a tag-equality predicate (+@field:
value+) to the bound query.
Field - Inherited
| #to_args | Render this field as the array of |
Constructor Details
.new(name, query = nil, **options) ⇒ TagField
Build a TAG field.
# File 'lib/redis/commands/modules/search/field.rb', line 72
def initialize(name, query = nil, **) super(name, :tag, query, **) end
Instance Method Details
#eq(value) ⇒ Query
Add a tag-equality predicate (+@field:value+) to the bound query.
# File 'lib/redis/commands/modules/search/field.rb', line 80
def eq(value) query.add_predicate(TagEqualityPredicate.new(@alias_name || name, value)) end