Adapted search_shards rest test to work with Perl

Because of the way Perl treats numbers, the boost is represented
as 1 instead of 1.0, which caused this test to fail.
This commit is contained in:
Clinton Gormley 2017-04-02 12:50:21 +02:00
parent 5b3c662145
commit 01b807f98e
1 changed files with 15 additions and 2 deletions

View File

@ -57,7 +57,10 @@
- length: { shards: 1 } - length: { shards: 1 }
- match: { shards.0.0.index: test_index } - match: { shards.0.0.index: test_index }
- match: { indices.test_index: {aliases: [test_alias_filter_1], filter: { term : { field: { value: value1, boost: 1.0}}}}} - match: { indices.test_index.aliases: [test_alias_filter_1] }
- match: { indices.test_index.filter.term.field.value: value1 }
- lte: { indices.test_index.filter.term.field.boost: 1.0 }
- gte: { indices.test_index.filter.term.field.boost: 1.0 }
- do: - do:
search_shards: search_shards:
@ -65,4 +68,14 @@
- length: { shards: 1 } - length: { shards: 1 }
- match: { shards.0.0.index: test_index } - match: { shards.0.0.index: test_index }
- match: { indices.test_index: {aliases: [test_alias_filter_1, test_alias_filter_2], filter: { bool: { should : [{ term : { field: { value: value1, boost: 1.0}}}, { term : { field: { value: value2, boost: 1.0}}}], adjust_pure_negative: true, boost: 1.0, disable_coord: false }}}} - match: { indices.test_index.aliases: [test_alias_filter_1, test_alias_filter_2]}
- match: { indices.test_index.filter.bool.should.0.term.field.value: value1 }
- lte: { indices.test_index.filter.bool.should.0.term.field.boost: 1.0 }
- gte: { indices.test_index.filter.bool.should.0.term.field.boost: 1.0 }
- match: { indices.test_index.filter.bool.should.1.term.field.value: value2}
- lte: { indices.test_index.filter.bool.should.1.term.field.boost: 1.0 }
- gte: { indices.test_index.filter.bool.should.1.term.field.boost: 1.0 }
- match: { indices.test_index.filter.bool.adjust_pure_negative: true}
- match: { indices.test_index.filter.bool.disable_coord: false}
- lte: { indices.test_index.filter.bool.boost: 1.0 }
- gte: { indices.test_index.filter.bool.boost: 1.0 }