-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
211 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
-- | ||
:api: get-source | ||
:request: GetRequest | ||
:response: BytesReference | ||
-- | ||
|
||
[id="{upid}-{api}"] | ||
=== Get Source API | ||
|
||
This API helps to get only the `_source` field of a document. | ||
|
||
[id="{upid}-{api}-request"] | ||
==== Get Request | ||
|
||
Request `GetRequest` is the same like a Get API request: | ||
|
||
["source","java",subs="attributes,callouts,macros"] | ||
-------------------------------------------------- | ||
include-tagged::{doc-tests-file}[{api}-request] | ||
-------------------------------------------------- | ||
<1> `FetchSourceContext` 's first argument `fetchSource` must be `true`, otherwise | ||
`ElasticsearchException` get thrown | ||
<2> Arguments `excludes` and `includes` are optional (see examples in Get API documentation) | ||
|
||
include::../execution.asciidoc[] | ||
|
||
[id="{upid}-{api}-response"] | ||
==== Get Source Response | ||
|
||
The returned +{response}+ represents a byte string of the source of requested document. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters