Skip to content

Commit

Permalink
fix: es 1.x does not include _routing in the response
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosgz committed Jul 12, 2024
1 parent 97979f5 commit c6a4c33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/support/shared_examples/repository_documents_import.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
context 'when the document routing is set' do
include_context 'with stories index definition'

it 'indexes the data and bulk updates all the document routing' do
it 'indexes the data and bulk updates all the document routing' do |example|
es_client do |client, _conf, cluster|
StoriesIndex.create_index(alias: true)

Expand All @@ -162,7 +162,9 @@
doc = StoriesIndex.get(id: '1001', routing: 'nyt')
expect(doc.dig('_source', 'publication')).to eq('nyt')
expect(doc.dig('_source', 'tags')).to be(nil)
expect(doc.dig('_routing')).to eq('nyt')
unless %w[1.x].include?(example.metadata[:es_version])
expect(doc.dig('_routing')).to eq('nyt')
end
end
end

Expand Down

0 comments on commit c6a4c33

Please sign in to comment.