apoc.es.postRaw
Procedure APOC Full
apoc.es.postRaw(host-or-port,path,payload-or-null) yield value - perform a raw POST operation on elastic search
Usage Examples
The examples in this section are based on an Elastic instance populated with the accounts.json sample dataset from the Getting Started with Elasticsearch guide. You can find instructions for setting this up at github.com/neo4j-examples/elastic-example.
We can create a document with a name
property of John Doe
in the customers
index, by running the following query:
CALL apoc.es.postRaw("localhost","customers/_doc", {
name: "John Doe"
});
value |
---|
{result: "created", _shards: {total: 2, failed: 0, successful: 1}, _seq_no: 8, _index: "customers", _type: "_doc", _id: "JG43_3UBi9jUSsIzOYJL", _version: 1, _primary_term: 1} |