Class: RediSearch::Create
- Inherits:
-
Object
- Object
- RediSearch::Create
- Defined in:
- lib/redi_search/create.rb
Constant Summary collapse
- OPTION_MAPPER =
{ max_text_fields: "MAXTEXTFIELDS", no_offsets: "NOOFFSETS", no_highlight: "NOHL", no_fields: "NOFIELDS", no_frequencies: "NOFREQS" }.freeze
Instance Method Summary collapse
- #call ⇒ Object
- #call! ⇒ Object
-
#initialize(index, schema, options) ⇒ Create
constructor
A new instance of Create.
Constructor Details
#initialize(index, schema, options) ⇒ Create
Returns a new instance of Create.
13 14 15 16 17 |
# File 'lib/redi_search/create.rb', line 13 def initialize(index, schema, ) @index = index @schema = schema = end |
Instance Method Details
#call ⇒ Object
23 24 25 26 27 |
# File 'lib/redi_search/create.rb', line 23 def call call! rescue Redis::CommandError false end |
#call! ⇒ Object
19 20 21 |
# File 'lib/redi_search/create.rb', line 19 def call! RediSearch.client.call!(*command).ok? end |