diff --git a/opensearch-api/lib/opensearch/api/utils.rb b/opensearch-api/lib/opensearch/api/utils.rb index a17f7c09d..0e410ee61 100644 --- a/opensearch-api/lib/opensearch/api/utils.rb +++ b/opensearch-api/lib/opensearch/api/utils.rb @@ -97,13 +97,13 @@ def __pathify(*segments) # in a single item. # # OpenSearch::API::Utils.__bulkify [ - # { :index => { :_index => 'myindexA', :_type => 'mytype', :_id => '1', :data => { :title => 'Test' } } }, - # { :update => { :_index => 'myindexB', :_type => 'mytype', :_id => '2', :data => { :doc => { :title => 'Update' } } } } + # { :index => { :_index => 'myindexA', :_id => '1', :data => { :title => 'Test' } } }, + # { :update => { :_index => 'myindexB', :_id => '2', :data => { :doc => { :title => 'Update' } } } } # ] # - # # => {"index":{"_index":"myindexA","_type":"mytype","_id":"1"}} + # # => {"index":{"_index":"myindexA","_id":"1"}} # # => {"title":"Test"} - # # => {"update":{"_index":"myindexB","_type":"mytype","_id":"2"}} + # # => {"update":{"_index":"myindexB","_id":"2"}} # # => {"doc":{"title":"Update"}} # def __bulkify(payload) diff --git a/opensearch-api/spec/opensearch/api/actions/hashie_spec.rb b/opensearch-api/spec/opensearch/api/actions/hashie_spec.rb index 09067d890..40937593e 100644 --- a/opensearch-api/spec/opensearch/api/actions/hashie_spec.rb +++ b/opensearch-api/spec/opensearch/api/actions/hashie_spec.rb @@ -45,7 +45,6 @@ "hits": [ { "_index": "myindex", - "_type": "mytype", "_id": "1", "_score": 0.51104903, "_source": { @@ -63,7 +62,6 @@ }, "facets": { "tags": { - "_type": "terms", "missing": 0, "total": 10, "other": 0, diff --git a/opensearch-api/spec/opensearch/api/utils_spec.rb b/opensearch-api/spec/opensearch/api/utils_spec.rb index 7f9f7cfe4..1c1248623 100644 --- a/opensearch-api/spec/opensearch/api/utils_spec.rb +++ b/opensearch-api/spec/opensearch/api/utils_spec.rb @@ -109,19 +109,19 @@ let(:result) do utils.__bulkify [ - { :index => { :_index => 'myindexA', :_type => 'mytype', :_id => '1', :data => { :title => 'Test' } } }, - { :update => { :_index => 'myindexB', :_type => 'mytype', :_id => '2', :data => { :doc => { :title => 'Update' } } } }, - { :delete => { :_index => 'myindexC', :_type => 'mytypeC', :_id => '3' } } + { :index => { :_index => 'myindexA', :_id => '1', :data => { :title => 'Test' } } }, + { :update => { :_index => 'myindexB', :_id => '2', :data => { :doc => { :title => 'Update' } } } }, + { :delete => { :_index => 'myindexC', :_id => '3' } } ] end let(:expected_string) do <<-PAYLOAD.gsub(/^\s+/, '') - {"index":{"_index":"myindexA","_type":"mytype","_id":"1"}} + {"index":{"_index":"myindexA","_id":"1"}} {"title":"Test"} - {"update":{"_index":"myindexB","_type":"mytype","_id":"2"}} + {"update":{"_index":"myindexB","_id":"2"}} {"doc":{"title":"Update"}} - {"delete":{"_index":"myindexC","_type":"mytypeC","_id":"3"}} + {"delete":{"_index":"myindexC","mytypeC","_id":"3"}} PAYLOAD end diff --git a/profile/benchmarking/measurable.rb b/profile/benchmarking/measurable.rb index 296f942ea..25953e196 100644 --- a/profile/benchmarking/measurable.rb +++ b/profile/benchmarking/measurable.rb @@ -247,7 +247,7 @@ def client def dataset_slices(slice_size=10000) @dataset_slices ||= begin dataset.collect do |d| - { index: { _index: INDEX, _type: '_doc', data: d } } + { index: { _index: INDEX, data: d } } end.each_slice(slice_size) end end