mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-04 09:59:16 +00:00
* Replace custom type names with _doc in REST examples. * Avoid using two mapping types in the percolator docs. * Rename doc -> _doc in the main repository README. * Also replace some custom type names in the HLRC docs.
15 lines
514 B
Plaintext
15 lines
514 B
Plaintext
[[java-docs-get]]
|
|
=== Get API
|
|
|
|
The get API allows to get a typed JSON document from the index based on
|
|
its id. The following example gets a JSON document from an index called
|
|
twitter, under a type called `_doc``, with id valued 1:
|
|
|
|
[source,java]
|
|
--------------------------------------------------
|
|
GetResponse response = client.prepareGet("twitter", "_doc", "1").get();
|
|
--------------------------------------------------
|
|
|
|
For more information on the get operation, check out the REST
|
|
{ref}/docs-get.html[get] docs.
|