Skip to content

Commit f01446a

Browse files
committed
[STORE] Added Model.create_index! and Model.refresh_index! methods (delegated to gateway)
1 parent 783cd1a commit f01446a

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

elasticsearch-persistence/lib/elasticsearch/persistence/model.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ def gateway(&block)
7878
:search,
7979
:find,
8080
:exists?,
81+
:create_index!,
82+
:refresh_index!,
8183
to: :gateway
8284
end
8385

elasticsearch-persistence/test/integration/model/model_basic_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class ::Person
2727

2828
context "A basic persistence model" do
2929
setup do
30-
Person.gateway.create_index! force: true
30+
Person.create_index! force: true
3131
end
3232

3333
should "save the object with custom ID" do

0 commit comments

Comments
 (0)