View Source Snap.Document (Snap v0.12.1)

Convenience API into the Document API.

Summary

Functions

Creates a new document in the index. The ID will be assigned automatically.

Creates a document in the index with the specified ID. Fails if a document already exists at that ID.

Deletes a document in the index at the specified ID.

Gets a document in the index with the specified ID

Creates or updates a document in the index with the specified ID. Overwrite it if it already exists.

Updates the document at the ID. See the ElasticSearch/OpenSearch docs for more details about how updates are performed.

Functions

add(cluster, index, document, params \\ [], opts \\ [])

Creates a new document in the index. The ID will be assigned automatically.

create(cluster, index, document, id, params \\ [], opts \\ [])

Creates a document in the index with the specified ID. Fails if a document already exists at that ID.

delete(cluster, index, id, params \\ [], opts \\ [])

Deletes a document in the index at the specified ID.

get(cluster, index, id, params \\ [], opts \\ [])

Gets a document in the index with the specified ID

index(cluster, index, document, id, params \\ [], opts \\ [])

Creates or updates a document in the index with the specified ID. Overwrite it if it already exists.

update(cluster, index, body, id, params \\ [], opts \\ [])

Updates the document at the ID. See the ElasticSearch/OpenSearch docs for more details about how updates are performed.