Liking cljdoc? Tell your friends :D

zensols.dataset.elsearch

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]].
raw docstring

aggregationclj

(aggregation agg-query)

bucketsclj

(buckets by-field)

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
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
raw docstring

create-contextclj

(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.

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 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)
raw docstring

create-indexclj

(create-index)

Create a new Elasticsearch index.

Create a new Elasticsearch index.
raw docstring

delete-documentclj

(delete-document id)

delete-indexclj

(delete-index)

Delete an Elasticsearch index.

Delete an Elasticsearch index.
raw docstring

delete-mappingclj

(delete-mapping)

Delete an Elasticsearch mapping.

Delete an Elasticsearch mapping.
raw docstring

describeclj

(describe)

Get the mapping (provide info) about the index.

Get the mapping (provide info) about the index.
raw docstring

document-by-idclj

(document-by-id id)

Return a document by its ID.

Return a document by its ID.
raw docstring

document-countclj

(document-count)

Return the total number of documents in the DB.

Return the total number of documents in the DB.
raw docstring

document-idsclj

(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`.
raw docstring

documentsclj

(documents)

Return all documents as a lazy sequence.

Return all documents as a lazy sequence.
raw docstring

exists?clj

(exists?)

put-documentclj

(put-document doc)
(put-document id doc)

Add a document to Elasticsearch.

Add a document to Elasticsearch.
raw docstring

recreate-indexclj

(recreate-index)

Delete an then create Elasticsearch index.

Delete an then create Elasticsearch index.
raw docstring

(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.
raw docstring

search-literalclj

(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.
raw docstring

with-contextclj/smacro

(with-context exprs & forms)

Execute a body with the form (with-context [context <keys>] ...)

Execute 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]]
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close