get.asciidoc 513 B

1234567891011121314
  1. [[java-docs-get]]
  2. === Get API
  3. The get API allows to get a typed JSON document from the index based on
  4. its id. The following example gets a JSON document from an index called
  5. twitter, under a type called tweet, with id valued 1:
  6. [source,java]
  7. --------------------------------------------------
  8. GetResponse response = client.prepareGet("twitter", "tweet", "1").get();
  9. --------------------------------------------------
  10. For more information on the get operation, check out the REST
  11. {ref}/docs-get.html[get] docs.