Liking cljdoc? Tell your friends :D

clojurewerkz.elastisch.native.index


clear-cacheclj

(clear-cache conn index-name)
(clear-cache conn index-name opts)

Clears caches index or multiple indices

Clears caches index or multiple indices
sourceraw docstring

closeclj

(close conn index-name)

Closes an index or indices

Usage:

(idx/close conn "my-index")
(idx/close conn ["my-index" "dein-index"])
Closes an index or indices

Usage:

```clojure
(idx/close conn "my-index")
(idx/close conn ["my-index" "dein-index"])
```
sourceraw docstring

createclj

(create conn index-name)
(create conn index-name opts)

Creates an index.

Accepted options are :mappings and :settings. Both accept maps with the same structure as in the REST API.

Examples:

(require '[clojurewerkz.elastisch.native.index :as idx])

(idx/create conn "myapp_development")
(idx/create conn "myapp_development" {:settings {"number_of_shards" 1}})

(let [mapping-types {:person {:properties {:username   {:type "string" :store "yes"}
                                           :first-name {:type "string" :store "yes"}
                                           :last-name  {:type "string"}
                                           :age        {:type "integer"}
                                           :title      {:type "string" :analyzer "snowball"}
                                           :planet     {:type "string"}
                                           :biography  {:type "string" :analyzer "snowball" :term_vector "with_positions_offsets"}}}}]
  (idx/create conn "myapp_development" {:mappings mapping-types}))
Creates an index.

Accepted options are `:mappings` and `:settings`. Both accept maps with the same structure as in the REST API.

Examples:

```clojure
(require '[clojurewerkz.elastisch.native.index :as idx])

(idx/create conn "myapp_development")
(idx/create conn "myapp_development" {:settings {"number_of_shards" 1}})

(let [mapping-types {:person {:properties {:username   {:type "string" :store "yes"}
                                           :first-name {:type "string" :store "yes"}
                                           :last-name  {:type "string"}
                                           :age        {:type "integer"}
                                           :title      {:type "string" :analyzer "snowball"}
                                           :planet     {:type "string"}
                                           :biography  {:type "string" :analyzer "snowball" :term_vector "with_positions_offsets"}}}}]
  (idx/create conn "myapp_development" {:mappings mapping-types}))
```
sourceraw docstring

create-templateclj

(create-template conn template-name)
(create-template conn template-name opts)
source

deleteclj

(delete conn)
(delete conn index-name)

Deletes an existing index

Deletes an existing index
sourceraw docstring

delete-templateclj

(delete-template conn template-name)
source

exists?clj

(exists? conn index-name)

Returns true if given index (or indices) exists

Returns `true` if given index (or indices) exists
sourceraw docstring

flushclj

(flush conn index-name)
(flush conn index-name opts)

Flushes an index or multiple indices

Flushes an index or multiple indices
sourceraw docstring

force-mergeclj

(force-merge conn index-name)
(force-merge conn index-name opts)

Optimizes an index or multiple indices

Optimizes an index or multiple indices
sourceraw docstring

get-aliasesclj

(get-aliases conn)
(get-aliases conn indices)

Fetches and returns the aliases for the given indices. Returns all aliases if no indices are given.

Fetches and returns the aliases for the given indices. Returns all aliases if no indices are given.
sourceraw docstring

get-mappingclj

(get-mapping conn index-name)
(get-mapping conn index-name type-name)

The get mapping API allows to retrieve mapping definition of index or index/type.

The get mapping API allows to retrieve mapping definition of index or index/type.
sourceraw docstring

get-settingsclj

(get-settings conn index-name)

Gets index settings.

Gets index settings.
sourceraw docstring

openclj

(open conn index-name)

Opens an index

Opens an index
sourceraw docstring

put-templateclj

(put-template conn template-name)
(put-template conn template-name opts)
source

refreshclj

(refresh conn index-name)

Refreshes an index or multiple indices

Refreshes an index or multiple indices
sourceraw docstring

segmentsclj

(segments conn index-name)

Returns segments information for one or more indices.

Returns segments information for one or more indices.
sourceraw docstring

statsclj

(stats conn)
(stats conn opts)

Returns statistics about indexes.

No argument version returns all stats. Options may be used to define what exactly will be contained in the response:

  • :docs: the number of documents, deleted documents
  • :store: the size of the index
  • :indexing: indexing statistics
  • :types: document type level stats
  • :groups: search group stats to retrieve the stats for
  • :get: get operation statistics, including missing stats
  • :search: search statistics, including custom grouping using the groups parameter (search operations can be associated with one or more groups)
  • :merge: merge operation stats
  • :flush: flush operation stats
  • :refresh: refresh operation stats
Returns statistics about indexes.

No argument version returns all stats.
Options may be used to define what exactly will be contained in the response:

* `:docs`: the number of documents, deleted documents
* `:store`: the size of the index
* `:indexing`: indexing statistics
* `:types`: document type level stats
* `:groups`: search group stats to retrieve the stats for
* `:get`: get operation statistics, including missing stats
* `:search`: search statistics, including custom grouping using the groups parameter (search operations can be associated with one or more groups)
* `:merge`: merge operation stats
* `:flush`: flush operation stats
* `:refresh`: refresh operation stats
sourceraw docstring

type-exists?clj

(type-exists? conn index-name type-name)

Returns true if a type/types exists in an index/indices

Returns `true` if a type/types exists in an index/indices
sourceraw docstring

update-aliasesclj

(update-aliases conn ops)
(update-aliases conn ops opts)

Performs a batch of alias operations. Takes a collection of actions in the following form where plural keys (indices, aliases) can be supplied as collections or single strings

[{:add    { :indices "test1" :alias "alias1" }}
 {:remove { :index "test1" :aliases "alias1" }}]
Performs a batch of alias operations. Takes a collection of actions in the following form where
plural keys (indices, aliases) can be supplied as collections or single strings

```edn
[{:add    { :indices "test1" :alias "alias1" }}
 {:remove { :index "test1" :aliases "alias1" }}]
```
sourceraw docstring

update-mappingclj

(update-mapping conn index-name mapping-type opts)

The put mapping API allows to register or modify specific mapping definition for a specific type.

The put mapping API allows to register or modify specific mapping definition for a specific type.
sourceraw docstring

update-settingsclj

(update-settings conn index-name settings)

Updates index settings. No argument version updates index settings globally

Updates index settings. No argument version updates index settings globally
sourceraw docstring

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

× close