2013-07-01 10:03:37 -04:00
|
|
|
---
|
|
|
|
"Fields":
|
2014-01-07 10:19:06 -05:00
|
|
|
|
2013-07-01 10:03:37 -04:00
|
|
|
- do:
|
|
|
|
index:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
id: 1
|
|
|
|
body: { foo: bar }
|
|
|
|
|
|
|
|
- do:
|
|
|
|
cluster.health:
|
|
|
|
wait_for_status: yellow
|
|
|
|
|
|
|
|
- do:
|
|
|
|
mget:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
body:
|
|
|
|
docs:
|
|
|
|
- { _id: 1 }
|
|
|
|
- { _id: 1, fields: foo }
|
|
|
|
- { _id: 1, fields: [foo] }
|
|
|
|
- { _id: 1, fields: [foo, _source] }
|
|
|
|
|
|
|
|
- is_false: docs.0.fields
|
|
|
|
- match: { docs.0._source: { foo: bar }}
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.1.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.1._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.2.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.2._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.3.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- match: { docs.3._source: { foo: bar }}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
mget:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
fields: foo
|
|
|
|
body:
|
|
|
|
docs:
|
|
|
|
- { _id: 1 }
|
|
|
|
- { _id: 1, fields: foo }
|
|
|
|
- { _id: 1, fields: [foo] }
|
|
|
|
- { _id: 1, fields: [foo, _source] }
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.0.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.0._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.1.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.1._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.2.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.2._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.3.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- match: { docs.3._source: { foo: bar }}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
mget:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
fields: [foo]
|
|
|
|
body:
|
|
|
|
docs:
|
|
|
|
- { _id: 1 }
|
|
|
|
- { _id: 1, fields: foo }
|
|
|
|
- { _id: 1, fields: [foo] }
|
|
|
|
- { _id: 1, fields: [foo, _source] }
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.0.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.0._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.1.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.1._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.2.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.2._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.3.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- match: { docs.3._source: { foo: bar }}
|
|
|
|
|
|
|
|
- do:
|
|
|
|
mget:
|
|
|
|
index: test_1
|
|
|
|
type: test
|
|
|
|
fields: [foo, _source]
|
|
|
|
body:
|
|
|
|
docs:
|
|
|
|
- { _id: 1 }
|
|
|
|
- { _id: 1, fields: foo }
|
|
|
|
- { _id: 1, fields: [foo] }
|
|
|
|
- { _id: 1, fields: [foo, _source] }
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.0.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- match: { docs.0._source: { foo: bar }}
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.1.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.1._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.2.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- is_false: docs.2._source
|
|
|
|
|
2014-01-03 19:21:43 -05:00
|
|
|
- match: { docs.3.fields.foo: [bar] }
|
2013-07-01 10:03:37 -04:00
|
|
|
- match: { docs.3._source: { foo: bar }}
|
|
|
|
|