get.asciidoc 504 B

123456789101112131415161718
  1. [[get]]
  2. == Get API
  3. The get API is very similar to the
  4. {java}/get.html[Java get API]. The main benefit
  5. of using groovy is handling the source content. It can be automatically
  6. converted to a `Map` which means using Groovy to navigate it is simple:
  7. [source,js]
  8. --------------------------------------------------
  9. def getF = node.client.get {
  10. index "test"
  11. type "type1"
  12. id "1"
  13. }
  14. println "Result of field2: $getF.response.source.complex.field2"
  15. --------------------------------------------------