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.
- length: { shards: 1 }
- 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:
search_shards:
- length: { shards: 1 }
- 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 }
