TL;DR
Elastisch is a battle tested, small but feature rich and well documented Clojure client for ElasticSearch. It supports virtually every Elastic Search feature and has solid documentation.
2.0.0-rc1 is a release candidate of Elastisch 2.0, which focuses on the new features in ElasticSearch 1.1 and introduces major API improvements, including a breaking change.
Changes between Elastisch 2.0.0-beta5 and 2.0.0-rc1
Connection/Client As Explicit Argument
Starting with Elastisch 2.0.0-rc1
, connection (client) is no longer a shared
dynamic var but rather is an explicit argument that relevant API functions
accept.
Before the change:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
After the change:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
|
Dynamic var reliance has been a major complaint of Clojure users for quite some time and 2.0 is the right time to fix this.
Changes between Elastisch 2.0.0-beta4 and 2.0.0-beta5
Response Helpers Compatible With ES 1.1
clojurewerkz.elastisch.rest.response/created?
and clojurewerkz.elastisch.native.response/created?
were adapted for recent ES releases.
Contributed by Oliver McCormack (The Climate Corporation).
ElasticSearch Client Update
ElasticSearch client has been upgraded to 1.1.1
.
Changes between Elastisch 2.0.0-beta3 and 2.0.0-beta4
Options As Maps
Elastisch has tranditionally accepted options as (pseudo) keywrod arguments, e.g.
1
|
|
Starting with 2.0.0-beta4
, passing a single map of arguments
is now also supported by nearly all document, index, admin and percolation
functions:
1
|
|
As a new design rule, all new API elements (e.g. aggregations) will accept a single map of options.
GH issue: #59.
Percolation of Existing Documents (REST API)
REST API client now supports percolation of existing documents:
1 2 3 |
|
Changes between Elastisch 2.0.0-beta2 and 2.0.0-beta3
ElasticSearch Client Update
ElasticSearch client has been upgraded to 1.1.0
.
Clojure 1.6
Elastisch now depends on org.clojure/clojure
version 1.6.0
. It is
still compatible with Clojure 1.4 and if your project.clj
depends on
a different version, it will be used, but 1.6 is the default now.
Type Exists Operation
types-exists support in both rest and native clients:
1 2 3 |
|
Contributed by Halit Olali.
Changes between Elastisch 2.0.0-beta1 and 2.0.0-beta2
(Improved) Aggregation Support
Elastisch 2.0 features multiple convenience functions for working with ElasticSearch aggregations.
clojurewerkz.elastisch.aggregation
is a new namespace that contains
helper functions that produce various types of aggregations. Just like
clojurewerkz.elastisch.query
, all of the functions return maps and
are optional.
clojurewerkz.elastisch.rest.response/aggregations-from
is a new function
that returns aggregations from a search response:
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Aggregations support is primarily focused on REST client at the moment.
clj-http Update
clj-http dependency has been upgraded to version 0.9.1
.
Changes between Elastisch 1.4.0 and 2.0.0-beta1
ElasticSearch 1.0 Compatibility
Main goal of Elastisch 2.0 is ElasticSearch 2.0 compatibility. This includes minor API changes (in line with ElasticSearch 1.0 API and terminology changes) and moderate internal modifications.
Support for cluster nodes stats and info REST APIs
clojureworkz.elastisch.rest.admin/nodes-info
and clojureworkz.elastisch.rest.admin/nodes-stats
are new administrative functions that provide access to ElasticSearch
cluster stats and node info.
Examples:
1 2 3 4 5 6 7 8 9 |
|
See ElasticSearch nodes stats documentation, nodes info page, and node specification page for more info.
Contributed by Joachim De Beule.
Support for _cluster/state REST API
Added (clojureworkz.elastisch.rest.admin/cluster-state & {:as params})
Examples:
1 2 3 4 |
|
See ElasticSearch documentation for more info.
Contributed by Joachim De Beule.
Support for _cluster/health REST API
Added (clojureworkz.elastisch.rest.admin/cluster-health & {:as params})
Example:
1 2 3 4 5 6 |
|
See ElasticSearch documentation for more info.
Contributed by Joachim De Beule.
Support for analyze in REST API client
Added (doc/analyze text & {:as params})
See ElasticSearch documentation for more info.
Examples:
1 2 3 4 5 6 7 |
|
Contributed by Joachim De Beule
Query String Escaping
clojurewerkz.elastisch.query/query-string
accepts a new option, :escape-with
,
which is a function that performs escaping of special characters in query string
queries.
By default clojurewerkz.elastisch.escape/escape-query-string-characters
is used.
Contributed by Ben Reinhart (Groupon).
ElasticSearch Native Client Upgrade
Elastisch now depends on ElasticSearch native client version 1.0.1
.
clj-http Update
clj-http dependency has been upgraded to version 0.9.0
.
Full Change Log
Elastisch change log is available on GitHub.
Thank You, Contributors
Kudos to Halit Olali, shmish111, and Richie Vos for contributing to the 2.0 release.
Elastisch is a ClojureWerkz Project
Elastisch is part of the group of libraries known as ClojureWerkz, together with
- Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
- Monger, a Clojure MongoDB client for a more civilized age
- Cassaforte, a Clojure Cassandra client
- Titanium, a Clojure graph library
- Neocons, a client for the Neo4J REST API
- Welle, a Riak client with batteries included
- Quartzite, a powerful scheduling library
and several others. If you like Elastisch, you may also like our other projects.
Let us know what you think on Twitter or on the Clojure mailing list.
About the Author
Michael on behalf of the ClojureWerkz Team