The ClojureWerkz Blog

News and updates about ClojureWerkz projects

Elastisch 2.2.0-rc1 Is Released

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.2.0-rc1 is a release candidate of Elastisch 2.2 which introduces new features and bug fixes.

Elastisch 2.2.0 will be the last release to target ElasticSearch 1.7. After that Elastisch development will focus on ElasticSearch 2.x.

Changes between Elastisch 2.1.x and 2.2.0-rc1

Corrected Filter Option Name in Native Client

Native client now uses :filter for filters, just like the REST one.

Add completion and fuzzy suggestors for Native Client

clojurewerkz.elastisch.native.document has new function suggest for term autocompletion. It allows filter results by category and geolocation:

1
2
3
4
(require '[clojurewerkz.elastisch.native.document :as doc])

(doc/suggest conn index-name :completion "e" {:context {:gender "female"}})
(doc/suggest conn index-name :fuzzy "esmor" {:fuzziness 1 :min-length 2})

Contributed by Timo Sulg (@timgluz).

Fixed index/close and index/open argument type error

clojurewerkz.elastisch.native.conversion/->open-index-request and ->close-index-request passed plain string to CloseIndexRequest constructor, but it expected values passed as array of string. Fixed it with existing function conversion/->string-array and added missing tests for this usecase into clojurewerkz.elastisch.native-api.indices-settings-test.

Contributed by Timo Sulg (@timgluz).

Fixed update-with-script in Native Client

clojurewerkz.elastisch.native.conversion/->update-request arguments updated in clojurewerkz.elastisch.native.document/update-with-script to reflect recent changes.

Contributed by Michael Nussbaum.

Index Stats Update

clojurewerkz.elastisch.rest.index/stats has been updated for ElasticSearch 1.3.x and later versions.

Contributed by Roman Pearah.

create Bulk Operation Helper

Bulk operation helper functions now include create.

Contributed by @nikopol.

allow setting :ignore-unmapped in query sort instructions

In both native and rest apis, :ignore-unmapped may be set in the query by specifying a sort field-name and option-map instead of order name with the query/sort function. For example:

1
2
3
4
5
6
7
(require '[clojurewerkz.elastisch.native.document :as doc])
(require '[clojurewerkz.elastisch.query :as q])

(doc/search conn index type
            {:query (q/query-string :query "software" :default_field "summary")
             :sort  (q/sort "unmapped-field-name" {:ignore_unmapped true
                                                   :order "asc"})})

Contributed by @ryfow

allow setting :ignore_unmapped in query sort instructions

In both native and rest apis, :ignore-unmapped may be set in the query by specifying a sort field-name and option-map instead of order name with the query/sort function. For example:

1
2
3
4
5
6
7
(require '[clojurewerkz.elastisch.native.document :as doc])
(require '[clojurewerkz.elastisch.query :as q])

(doc/search conn [index-name missing-index-name]
                                             mapping-type
                                             :query   (q/match-all)
                                             :ignore_unavailable true)

Contributed by Joachim De Beule.

scan-and-scroll-seq helper

scan-and-scroll-seq provides an easier-to-use abstraction over ES’s scan and scroll API, wrapping scroll-seq and handling the special-case first request.

Contributed by @loganmhb

ElasticSearch Java Client Upgrade

Elastisch now depends on ElasticSearch Java client version 1.7.x.

clj-http Update

clj-http dependency has been upgraded to version 2.0.x.

Better support for plural/single indices and aliases in native update-aliases

  • :remove action now works with singular :index key
  • multiple aliases can be added with single :add action
  • alias can be removed from multiple indices with single :remove action

Contributed by @mnylen

Index Settings Now Allow Keywordized Keys When Creating Index Using Native API

Previously only mappings allowed keys to be keywords, now same works with index settings.

Contributed by @mnylen

Support for Large Scroll IDs

Elastisch now supports scroll IDs larger than 4 KB.

Contributed by niko.

Bulk Operation Support in Native Client

Native client now supports bulk operations with the same API as the REST one.

Contributed by

  • Mitchel Kuijpers (Avisi)
  • Michael Nussbaum and Jack Lund (Braintree)

Fixed unregister-query in Native Client

clojurewerkz.elastisch.native.percolation/unregister-query arguments were mistakenly swapped when delegating to the Java client.

Contributed by Stephen Muss.

Guava Excluded From Dependencies

Contributed by Jan Stępień (Stylefruits).

Add support for Nested Aggregations in the Native Client

Native client now supports nesting in the following aggregations

  • histogram
  • date_histogram
  • range
  • date_range
  • terms

Contributed by Mitchel Kuijpers (Avisi).

ElasticSearch Java Client Upgrade

Elastisch now depends on ElasticSearch Java client version 1.4.x.

clj-http Update

clj-http dependency has been upgraded to version 1.0.1.

Cheshire Update

Cheshire dependency has been upgraded to version 5.4.0.

Full Change Log

Elastisch change log is available on GitHub.

Thank You, Contributors

Kudos to Michael Nussbaum and Jeffrey Erikson for contributing to this 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
  • Cassaforte, a Clojure Cassandra client
  • Monger, a Clojure MongoDB client for a more civilized age
  • 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

Pantomime 2.8.0 Is Released

TL;DR

Pantomime is a Clojure interface to Apache Tika. 2.8.0 is a minor release that upgrades Tika and introduces a minor feature.

Changes between Pantomime 2.7.0 and 2.8.0

Apache Tika 1.11

Apache Tika dependency has been upgraded to version 1.11.

MIME Pattern Extension

pantomime.mime/add-pattern is a new function that makes it possible to extent MIME patterns used by the library:

1
2
3
(require '[pantomime.mime :as pm])

(pm/add-pattern "text/lorem-ipsum" ".+\\.ipsum$" "lorem.ipsum")

Contributed by Daniel Woelfel and Tommi Reinikainen.

Clojure 1.7

The library now depends on Clojure 1.7.

Change Log

Pantomime change log is available on GitHub.

Pantomime is a ClojureWerkz Project

Pantomime 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
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Cassaforte, a Clojure Cassandra client built around CQL
  • Monger, a Clojure MongoDB client for a more civilized age
  • Welle, a Riak client with batteries included
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Pantomime, you may also like our other projects.

Let us know what you think on Twitter or on the Clojure mailing list.

Michael on behalf of the ClojureWerkz Team

Langohr 3.4.2 Is Released

TL;DR

Langohr is a small Clojure RabbitMQ client.

3.4.2 is a minor release that updates RabbitMQ Java client dependency.

Changes between Langohr 3.4.1 and 3.4.2

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to 3.5.7.

Change Log

Langohr change log is available on GitHub.

Langohr is a ClojureWerkz Project

Langohr is part of the group of libraries known as ClojureWerkz, together with

  • Elastisch, a minimalistic well documented Clojure client for ElasticSearch
  • Cassaforte, a Clojure Cassandra client built around CQL 3.0
  • Monger, a Clojure MongoDB client for a more civilized age
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Langohr, 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

Langohr 3.4.0 Is Released

TL;DR

Langohr is a small Clojure RabbitMQ client.

3.4.0 is a minor release that updates RabbitMQ Java client dependency.

Changes between Langohr 3.3.x and 3.4.0

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to 3.5.5.

Change Log

Langohr change log is available on GitHub.

Langohr is a ClojureWerkz Project

Langohr is part of the group of libraries known as ClojureWerkz, together with

  • Elastisch, a minimalistic well documented Clojure client for ElasticSearch
  • Cassaforte, a Clojure Cassandra client built around CQL 3.0
  • Monger, a Clojure MongoDB client for a more civilized age
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Langohr, 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

Neocons 3.1.0 Is Released

TL;DR

Neocons is a feature rich idiomatic Clojure client for the Neo4J REST API.

3.1.0 is a minor release that targets Neo4J server 2.2.

Changes between Neocons 3.0.0 and 3.1.0

Neo4J 2.2: Ability to Change Password

clojurewerkz.neocons.rest.password/change-password is a new function that can be used to update user credentials:

1
2
3
(require 'clojurewerkz.neocons.rest.password :as pwd)

(pwd/change-password uri "joe" "old-pwd" "new-pwd")

Contributed by Rohit Aggarwal.

Urly Dependency Dropped

Neocons no longer depends on Urly, a deprecated ClojureWerkz library.

Contributed by Ricardo J. Mendez.

Clojure 1.7

Neocons now depends on org.clojure/clojure version 1.7.0. It is still compatible with Clojure 1.5 and if your project.clj depends on a different version, it will be used, but 1.7 is the default now.

clj-http Upgrade

clj-http dependency has been updated to 2.0.0.

Cheshire Upgrade

Cheshire dependency has been updated to 5.5.0.

HTTP Authentication via URI

It is now possible to specify credentials in the URI.

Contributed by Øystein Jakobsen.

ClojureWerkz Support Upgrade

Neocons now uses ClojureWerkz Support 1.1.0.

Change Log

Neocons change log is available on GitHub.

Neocons is a ClojureWerkz Project

Neocons 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
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Monger, a Clojure MongoDB client for a more civilized age
  • Cassaforte, a Cassandra client built around CQL 3
  • Quartzite, a powerful scheduling library

and several others. If you like Neocons, you may also like our other projects.

Let us know what you think on Twitter or on the Clojure mailing list.

Michael on behalf of the ClojureWerkz Team

Langohr 3.3.0 Is Released

TL;DR

Langohr is a small Clojure RabbitMQ client.

3.3.0 is a minor feature release.

Changes between Langohr 3.2.x and 3.3.0

Forgiving Exception Handler by Default

Langohr now uses Java client’s forgiving exception handler by default. This means unhandled consumer exceptions won’t result in channel closure.

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to 3.5.4.

clj-http Upgrade

clj-http dependency has been updated to 2.0.0.

This version of clj-http bumps Apache HTTP client version to 4.5. If this is undesirable for your project, you can exclude Langohr’s dependency on clj-http and use another version.

See Langohr’s project.clj (the cljhttp076 profile).

Cheshire Upgrade

Cheshire dependency has been updated to 5.5.0.

Change Log

Langohr change log is available on GitHub.

Langohr is a ClojureWerkz Project

Langohr is part of the group of libraries known as ClojureWerkz, together with

  • Elastisch, a minimalistic well documented Clojure client for ElasticSearch
  • Cassaforte, a Clojure Cassandra client built around CQL 3.0
  • Monger, a Clojure MongoDB client for a more civilized age
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Langohr, 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

Monger 3.0.0 Is Released

TL;DR

Monger is an idiomatic Clojure MongoDB driver for a more civilized age. It has batteries included, offers powerful expressive query DSL, strives to support every MongoDB 2.0+ feature and has sane defaults. It also has solid documentation.

3.0.0 is a major release based on version 3.0 of the MongoDB Java driver.

We are only getting started with migrating to the 3.0 Java driver. This release focuses on removing Monger API elements that are no longer available. There are quite a few impovements that Monger can use: more efficient serislisation API, asynchronous API, and so on. Monger will make use of those in future 3.x releases.

We’d like to thank Jeff Yemin and Ross Lawley from MongoDB for helping us migrate, sharing Java client roadmap, and answering our endless questions. Monger 3.0 would ship months later if this wasn’t for them.

Changes between 2.1.0 and 3.0.0

Monger 3.0 is based on the MongoDB Java driver 3.0 and has some (relatively minor) breaking API changes.

Error Handling Built Around Write Concerns

Monger no longer provides monger.core/get-last-error. It is no longer needed: write concerns and exceptions is now the primary way for clients to be notified of operation failures.

New Authentication API

MongoDB 3.0 supports different authentication mechanisms. Multiple credentials can be specified for a single connection. The client and the server then can negotiate what authentication mechanism to use and which set of credentials succeed.

Monger introduces a new namespace for credential instantiation: monger.credentials. The most common function that relies on authentication mechanism negotiation is monger.credentials/for:

1
2
3
4
5
6
(require '[monger.core :as mg])
(require '[monger.credentials :as mcr])

(let [creds (mcr/for "username" "db-name" "pa$$w0rd")
      conn  (mg/connect-with-credentials "127.0.0.1" creds)]
      )

mg/connect-with-credentials is the most convenient function to connect with if you plan on using authentication.

When connecting using a URI, the API hasn’t changed.

monger.search is Gone

monger.search is gone. MongoDB 3.0 supports search queries using regular query operators, namely $text. monger.operators is extended to include $text, $search, $language, and $natural.

An example of a search query in 3.0:

1
2
3
4
5
6
7
8
9
(require '[monger.core :as mg])
(require '[monger.credentials :as mcr])
(require '[monger.collection :as mc])
(require '[monger.operators :refer [$text $search]])

(let [creds (mcr/for "username" "db-name" "pa$$w0rd")
      conn  (mg/connect-with-credentials "127.0.0.1" creds)
      db    (mg/get-db conn "db-name")]
  (mc/find-maps db "collection" {$text {$search "hello"}}))

JSON Serialization of BSON Timestamps

JSON serialisation extensions now support BSON timestamps.

Contributed by Tom McMillen.

Add allow-disk-use and Cursor Options to Aggregates

monger.collection/aggregate now supports :cursor and :allow-disk-use options.

Contributed by Bartek Marcinowski.

monger.collection/ensure-index No Longer Shadows clojure.core/name

5-arity of monger.collection/ensure-index no longer shadows clojure.core/name and fails with an obscure exception.

Contributed by Joshua Karstendick.

Change Log

Monger change log is available on GitHub.

Monger is a ClojureWerkz Project

Monger 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
  • Cassaforte, a Clojure Cassandra client built around CQL
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Welle, a Riak client with batteries included
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Monger, you may also like our other projects.

Let us know what you think on Twitter or on the Clojure mailing list.

About the Author

@michaelklishin on behalf of the ClojureWerkz Team

Money 1.9.0 Is Released

Money is a Clojure library that deals with monetary amounts and currencies, built on top of Joda Money.

1.9.0 is a minor release.

Changes Between 1.8.0 and 1.9.0

New Amount Functions

clojurewerkz.money.amounts/major-of, clojurewerkz.money.amounts/minor-of, and clojurewerkz.money.amounts/currency-of return major units (e.g. dollars, minor units (e.g. cents), and currency unit from a provided monetary amount (Money instance).

Clojure 1.7 By Default

The project now depends on org.clojure/clojure version 1.7.0. It is still compatible with Clojure 1.6 and if your project.clj depends on a different version, it will be used, but 1.7 is the default now.

We encourage all users to upgrade to 1.7, it is a drop-in replacement for the majority of projects out there.

Change Log

Money change log is available on GitHub.

Money is a ClojureWerkz Project

Money 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
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Cassaforte, a Clojure client for Cassandra built around CQL 3
  • Monger, a Clojure MongoDB driver for a more civilized age
  • Welle, a Riak client with batteries included
  • Neocons, a client for the Neo4J REST API
  • Meltdown, a Clojure interface to Reactor

and several others. If you like Money, you may also like our other projects.

Let us know what you think on Twitter or on the Clojure mailing list.

@michaelklishin on behalf of the ClojureWerkz Team

Pantomime 2.7.0 Is Released

TL;DR

Pantomime is a Clojure interface to Apache Tika. 2.7.0 is a minor release that upgrades Tika.

Apache Tika 1.9

Apache Tika dependency has been upgraded to version 1.9.

Change Log

Pantomime change log is available on GitHub.

Pantomime is a ClojureWerkz Project

Pantomime 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
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Cassaforte, a Clojure Cassandra client built around CQL
  • Monger, a Clojure MongoDB client for a more civilized age
  • Welle, a Riak client with batteries included
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Pantomime, you may also like our other projects.

Let us know what you think on Twitter or on the Clojure mailing list.

Michael on behalf of the ClojureWerkz Team

Monger 3.0.0-rc2 Is Released

TL;DR

Monger is an idiomatic Clojure MongoDB driver for a more civilized age. It has batteries included, offers powerful expressive query DSL, strives to support every MongoDB 2.0+ feature and has sane defaults. It also has solid documentation.

3.0.0 is a major release based on version 3.0 of the MongoDB Java driver.

Compared to 3.0.0-rc1, this release has a few bug fixes and a breaking API change in monger.credentials.

Changes between 3.0.0-rc1 and 3.0.0-rc2

Add allow-disk-use and Cursor Options to Aggregates

monger.collection/aggregate now supports :cursor and :allow-disk-use options.

Contributed by Bartek Marcinowski.

monger.collection/ensure-index No Longer Shadows clojure.core/name

5-arity of monger.collection/ensure-index no longer shadows clojure.core/name and fails with an obscure exception.

Contributed by Joshua Karstendick.

monger.core/connect No Longer Ignores the :uri Option

monger.core/connect no longer ignores the :uri option. Note that monger.core/connect-via-uri is the recommended way of connecting using URIs.

Contributed by Ivan Samsonov.

Change Log

Monger change log is available on GitHub.

Monger is a ClojureWerkz Project

Monger 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
  • Cassaforte, a Clojure Cassandra client built around CQL
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Welle, a Riak client with batteries included
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Monger, you may also like our other projects.

Let us know what you think on Twitter or on the Clojure mailing list.

About the Author

@michaelklishin on behalf of the ClojureWerkz Team