[API] Added _source,_source_include,_source_exclude to
* explain * get * mget * search * get_source
This commit is contained in:
parent
653ae20603
commit
a78781cdc6
|
@ -72,8 +72,20 @@
|
|||
"source": {
|
||||
"type" : "string",
|
||||
"description" : "The URL-encoded query definition (instead of using the request body)"
|
||||
},
|
||||
"_source": {
|
||||
"type" : "list",
|
||||
"description" : "True or false to return the _source field or not, or a list of fields to return"
|
||||
},
|
||||
"_source_exclude": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to exclude from the returned _source field"
|
||||
},
|
||||
"_source_include": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to extract and return from the _source field"
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
"body": {
|
||||
"description" : "The query definition using the Query DSL"
|
||||
|
|
|
@ -47,6 +47,18 @@
|
|||
"routing": {
|
||||
"type" : "string",
|
||||
"description" : "Specific routing value"
|
||||
},
|
||||
"_source": {
|
||||
"type" : "list",
|
||||
"description" : "True or false to return the _source field or not, or a list of fields to return"
|
||||
},
|
||||
"_source_exclude": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to exclude from the returned _source field"
|
||||
},
|
||||
"_source_include": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to extract and return from the _source field"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -24,6 +24,14 @@
|
|||
}
|
||||
},
|
||||
"params": {
|
||||
"_source_exclude": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to exclude from the returned _source field"
|
||||
},
|
||||
"_source_include": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to extract and return from the _source field"
|
||||
},
|
||||
"parent": {
|
||||
"type" : "string",
|
||||
"description" : "The ID of the parent document"
|
||||
|
|
|
@ -31,6 +31,18 @@
|
|||
"refresh": {
|
||||
"type" : "boolean",
|
||||
"description" : "Refresh the shard containing the document before performing the operation"
|
||||
},
|
||||
"_source": {
|
||||
"type" : "list",
|
||||
"description" : "True or false to return the _source field or not, or a list of fields to return"
|
||||
},
|
||||
"_source_exclude": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to exclude from the returned _source field"
|
||||
},
|
||||
"_source_include": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to extract and return from the _source field"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -98,6 +98,18 @@
|
|||
"type" : "string",
|
||||
"description" : "The URL-encoded request definition using the Query DSL (instead of using request body)"
|
||||
},
|
||||
"_source": {
|
||||
"type" : "list",
|
||||
"description" : "True or false to return the _source field or not, or a list of fields to return"
|
||||
},
|
||||
"_source_exclude": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to exclude from the returned _source field"
|
||||
},
|
||||
"_source_include": {
|
||||
"type" : "list",
|
||||
"description" : "A list of fields to extract and return from the _source field"
|
||||
},
|
||||
"stats": {
|
||||
"type" : "list",
|
||||
"description" : "Specific 'tag' of the request for logging and statistical purposes"
|
||||
|
|
|
@ -12,18 +12,18 @@
|
|||
body: { "include": { "field1": "v1", "field2": "v2" }, "count": 1 }
|
||||
|
||||
- do:
|
||||
get_source: { index: test_1, type: test, id: 1, include: include.field1 }
|
||||
get_source: { index: test_1, type: test, id: 1, _source_include: include.field1 }
|
||||
- match: { include.field1: v1 }
|
||||
- is_false: include.field2
|
||||
|
||||
- do:
|
||||
get_source: { index: test_1, type: test, id: 1, include: "include.field1,include.field2" }
|
||||
get_source: { index: test_1, type: test, id: 1, _source_include: "include.field1,include.field2" }
|
||||
- match: { include.field1: v1 }
|
||||
- match: { include.field2: v2 }
|
||||
- is_false: count
|
||||
|
||||
- do:
|
||||
get_source: { index: test_1, type: test, id: 1, include: include, exclude: "*.field2" }
|
||||
get_source: { index: test_1, type: test, id: 1, _source_include: include, _source_exclude: "*.field2" }
|
||||
- match: { include.field1: v1 }
|
||||
- is_false: include.field2
|
||||
- is_false: count
|
||||
|
|
Loading…
Reference in New Issue