Class IndexRequest

All Implemented Interfaces:
org.apache.lucene.util.Accountable, CompositeIndicesRequest, DocWriteRequest<IndexRequest>, IndicesRequest, WriteRequest<IndexRequest>, Writeable, RefCounted, TaskAwareRequest

Index request to index a typed JSON document into a specific index and make it searchable. Best created using Requests.indexRequest(String). The index requires the ReplicationRequest.index(), type(String), id(String) and source(byte[], XContentType) to be set. The source (content to index) can be set in its bytes form using (source(byte[], XContentType)), its string form (source(String, XContentType)) or using a XContentBuilder (source(org.elasticsearch.xcontent.XContentBuilder)). If the id(String) is not set, it will be automatically generated.
See Also: