Module: Legion::Extensions::ElasticAppSearch::Runners::Synonyms
- Includes:
- Helpers::Client, Helpers::Lex
- Defined in:
- lib/legion/extensions/elastic_app_search/runners/synonyms.rb
Instance Method Summary collapse
- #create(engine:, synonyms: [], **opts) ⇒ Object
- #delete(engine:, synonym:, **opts) ⇒ Object
- #get(engine:, synonym:, **opts) ⇒ Object
- #list(engine:, current: 1, size: 20, **opts) ⇒ Object
- #update(engine:, synonym:, synonyms: []) ⇒ Object
Methods included from Helpers::Client
Instance Method Details
#create(engine:, synonyms: [], **opts) ⇒ Object
8 9 10 |
# File 'lib/legion/extensions/elastic_app_search/runners/synonyms.rb', line 8 def create(engine:, synonyms: [], **opts) client(opts).create_synonym_set(engine, synonyms: synonyms) end |
#delete(engine:, synonym:, **opts) ⇒ Object
24 25 26 |
# File 'lib/legion/extensions/elastic_app_search/runners/synonyms.rb', line 24 def delete(engine:, synonym:, **opts) client(opts).destroy_synonym_set(engine, synonym) end |
#get(engine:, synonym:, **opts) ⇒ Object
12 13 14 |
# File 'lib/legion/extensions/elastic_app_search/runners/synonyms.rb', line 12 def get(engine:, synonym:, **opts) client(opts).get_synonym_set(engine, synonym) end |
#list(engine:, current: 1, size: 20, **opts) ⇒ Object
16 17 18 |
# File 'lib/legion/extensions/elastic_app_search/runners/synonyms.rb', line 16 def list(engine:, current: 1, size: 20, **opts) client(opts).list_synonym_sets(engine, current: current, size: size) end |
#update(engine:, synonym:, synonyms: []) ⇒ Object
20 21 22 |
# File 'lib/legion/extensions/elastic_app_search/runners/synonyms.rb', line 20 def update(engine:, synonym:, synonyms: []) client(opts).update_synonym_set(engine, synonym, synonyms: synonyms) end |