View Source Snap.Document (Snap v0.9.0)

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

Link to this function

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

View Source

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

Link to this function

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

View Source

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

Link to this function

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

View Source

Deletes a document in the index at the specified ID.

Link to this function

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

View Source

Gets a document in the index with the specified ID

Link to this function

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

View Source

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

Link to this function

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

View Source

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