Class: Elastify::ElasticSearchHelper::Document
- Inherits:
-
Object
- Object
- Elastify::ElasticSearchHelper::Document
- Defined in:
- lib/elastify/elastic_search_helper.rb
Instance Method Summary collapse
- #create(model) ⇒ Object
- #destroy(model) ⇒ Object
-
#initialize(options = {}) ⇒ Document
constructor
A new instance of Document.
- #scroll(scroll_id, scroll_timer = nil) ⇒ Object
- #search(dsl, scroll_timer = nil) ⇒ Object
- #update(model) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Document
Returns a new instance of Document.
5 6 7 |
# File 'lib/elastify/elastic_search_helper.rb', line 5 def initialize = {} self. = end |
Instance Method Details
#create(model) ⇒ Object
8 9 10 |
# File 'lib/elastify/elastic_search_helper.rb', line 8 def create model Connector.create(self., model) end |
#destroy(model) ⇒ Object
14 15 16 |
# File 'lib/elastify/elastic_search_helper.rb', line 14 def destroy model Connector.destroy(self., model) end |
#scroll(scroll_id, scroll_timer = nil) ⇒ Object
20 21 22 |
# File 'lib/elastify/elastic_search_helper.rb', line 20 def scroll scroll_id, scroll_timer = nil Connector.scroll(self., scroll_id, scroll_timer) end |