| 1234567891011121314151617181920212223242526272829303132333435363738 | [[get]]== Get APIThe get API allows to get a typed JSON document from the index based onits id. The following example gets a JSON document from an index calledtwitter, under a type called tweet, with id valued 1:[source,java]--------------------------------------------------GetResponse response = client.prepareGet("twitter", "tweet", "1")        .execute()        .actionGet();--------------------------------------------------For more information on the index operation, check out the RESTlink:{ref}/docs-get.html[get] docs.[float]=== Operation ThreadingThe get API allows to set the threading model the operation will beperformed when the actual execution of the API is performed on the samenode (the API is executed on a shard that is allocated on the sameserver).The options are to execute the operation on a different thread, or toexecute it on the calling thread (note that the API is still async). Bydefault, `operationThreaded` is set to `true` which means the operationis executed on a different thread. Here is an example that sets it to`false`:[source,java]--------------------------------------------------GetResponse response = client.prepareGet("twitter", "tweet", "1")        .setOperationThreaded(false)        .execute()        .actionGet();--------------------------------------------------
 |