A client simple wrapper for an Elasticsearch wrapper. You
probably want use the more client friendly zensols.dataset.db.
A *client simple* wrapper for an Elasticsearch wrapper. You probably want use the more client friendly [[zensols.dataset.db]].
(aggregation agg-query)(buckets by-field)Do an aggregation search and bucket by-field.
Return maps with keys:
Do an aggregation search and bucket **by-field**. Return maps with keys: * **:name** value of name given by **by-field** * **:count** the count of the bucket
(create-context index-name
mapping-type
&
{:keys [url mapping-type-defs settings]
:or {url "http://localhost:9200"
mapping-type-defs {:properties {mapping-type {}}}}})Create a new context to be used with with-context.
http://localhost:9200)Create a new context to be used with [[with-context]]. Parameters ---------- * **index-name** the name of the Elasticsearch index * **mapping-type** map type name (see ES docs) Keys ---- * **:url** the URL to the DB (defaults to `http://localhost:9200`) * **:mapping-type-defs** metadata (see ES docs)
(create-index)Create a new Elasticsearch index.
Create a new Elasticsearch index.
(delete-document id)(delete-index)Delete an Elasticsearch index.
Delete an Elasticsearch index.
(delete-mapping)Delete an Elasticsearch mapping.
Delete an Elasticsearch mapping.
(describe)Get the mapping (provide info) about the index.
Get the mapping (provide info) about the index.
(document-by-id id)Return a document by its ID.
Return a document by its ID.
(document-count)Return the total number of documents in the DB.
Return the total number of documents in the DB.
(document-ids)(document-ids query)Return document IDs only. The query default to match_all.
Return document IDs only. The query default to `match_all`.
(documents)Return all documents as a lazy sequence.
Return all documents as a lazy sequence.
(exists?)(put-document doc)(put-document id doc)Add a document to Elasticsearch.
Add a document to Elasticsearch.
(recreate-index)Delete an then create Elasticsearch index.
Delete an then create Elasticsearch index.
(search query)Return a lazy sequence of documents. Scanning is the underlying elastic search method here.
Return a lazy sequence of documents. Scanning is the underlying elastic search method here.
(search-literal query)Return a lazy sequence of documents. Scanning is the underlying elastic search method here.
Return a lazy sequence of documents. Scanning is the underlying elastic search method here.
(with-context exprs & forms)Execute a body with the form (with-context [context <keys>] ...)
create-contextcreate-contextExecute a body with the form (with-context [context <keys>] ...) * **context** is created with [[create-context]] * **keys...** option keys to override what was giving in [[create-context]]
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |