bloodhound: ElasticSearch client library for Haskell

[ bsd3, database, library, search ] [ Propose Tags ] [ Report a vulnerability ]

ElasticSearch made awesome for Haskell hackers


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
es1

Run the test suite against an Elasticsearch 1.x server

Disabled
es5

Run the test suite against an Elasticsearch 5.x server

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.4.0.1, 0.4.0.2, 0.5.0.0, 0.5.0.1, 0.6.0.0, 0.6.0.1, 0.7.0.0, 0.7.0.1, 0.8.0.0, 0.9.0.0, 0.10.0.0, 0.11.0.0, 0.11.1.0, 0.12.0.0, 0.12.1.0, 0.13.0.0, 0.14.0.0, 0.15.0.0, 0.15.0.1, 0.15.0.2, 0.16.0.0, 0.18.0.0, 0.19.0.0, 0.19.1.0, 0.20.0.0, 0.20.0.1, 0.20.0.2, 0.21.0.0, 0.22.0.0, 0.23.0.0 (info)
Change log changelog.md
Dependencies aeson (>=0.11.1 && <1.3), base (>=4.3 && <5), blaze-builder, bytestring (>=0.10.0 && <0.11), containers (>=0.5.0.0 && <0.6), data-default-class, exceptions, hashable, http-client (>=0.4.30 && <0.6), http-types (>=0.8 && <0.13), mtl (>=1.0 && <2.3), mtl-compat, network-uri (>=2.6 && <2.7), scientific (>=0.3.0.0 && <0.4.0.0), semigroups (>=0.15 && <0.19), text (>=0.11 && <1.3), time (>=1.4 && <1.9), transformers (>=0.2 && <0.6), unordered-containers, vector (>=0.10.9 && <0.13) [details]
License BSD-3-Clause
Copyright 2015, Chris Allen
Author Chris Allen
Maintainer cma@bitemyapp.com
Category Database, Search
Home page https://github.com/bitemyapp/bloodhound
Source repo head: git clone https://github.com/bitemyapp/bloodhound.git
Uploaded by MichaelXavier at 2018-01-29T21:31:40Z
Distributions LTSHaskell:0.21.0.0, NixOS:0.21.0.0, Stackage:0.23.0.0
Reverse Dependencies 5 direct, 2 indirect [details]
Downloads 25850 total (138 in the last 30 days)
Rating 2.0 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-01-29 [all 1 reports]

Readme for bloodhound-0.15.0.2

[back to package description]

Bloodhound TravisCI Hackage

Bloodhound (dog)

Elasticsearch client and query DSL for Haskell

Why?

Search doesn't have to be hard. Let the dog do it.

Endorsements

"Bloodhound makes Elasticsearch almost tolerable!" - Almost-gruntled user

"ES is a nightmare but Bloodhound at least makes it tolerable." - Same user, later opinion.

Version compatibility

As of version 0.13.0.0, Bloodhound has 2 separate module trees for ElasticSearch versions 1 and 5. Import the module that is appropriate for your use case. If you would like to add support for another major version, open a ticket expressing your intend and follow the pattern used for other versions. We weighed the idea of sharing code between versions but it just got too messy, especially considering the instability of the ElasticSearch API. We switched to a model which would allow the persons responsible for a particular protocol version to maintain that version while avoiding conflict with other versions.

See our TravisCI for a listing of ElasticSearch version we test against.

Stability

Bloodhound is stable for production use. I will strive to avoid breaking API compatibility from here on forward, but dramatic features like a type-safe, fully integrated mapping API may require breaking things in the future.

Testing

The TravisCI tests are run using Stack. You should use Stack instead of cabal to build and test Bloodhound to avoid compatibility problems. You will also need to have an ElasticSearch instance running at localhost:9200 in order to execute some of the tests. See the "Version compatibility" section above for a list of ElasticSearch versions that are officially validated against in TravisCI.

Steps to run the tests locally:

  1. Dig through the [past releases] (https://www.elastic.co/downloads/past-releases) section of the ElasticSearch download page and install the desired ElasticSearch versions.
  2. Install [Stack] (http://docs.haskellstack.org/en/stable/README.html#how-to-install)
  3. In your local Bloodhound directory, run stack setup && stack build
  4. Start the desired version of ElasticSearch at localhost:9200, which should be the default.
  5. Run stack test in your local Bloodhound directory.
  6. The unit tests will pass if you re-execute stack test. If you want to start with a clean slate, stop your ElasticSearch instance, delete the data/ folder in the ElasticSearch installation, restart ElasticSearch, and re-run stack test.

Hackage page and Haddock documentation

http://hackage.haskell.org/package/bloodhound

Elasticsearch Tutorial

It's not using Bloodhound, but if you need an introduction to or overview of Elasticsearch and how to use it, you can use this screencast.

Examples

See the examples directory for example code.

Contributors

Possible future functionality

Span Queries

Beginning here: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-span-first-query.html

Function Score Query

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html

Node discovery and failover

Might require TCP support.

Support for TCP access to Elasticsearch

Pretend to be a transport client?

Bulk cluster-join merge

Might require making a lucene index on disk with the appropriate format.

GeoShapeQuery

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-query.html

GeoShapeFilter

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-filter.html

Geohash cell filter

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geohash-cell-filter.html

HasChild Filter

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-has-child-filter.html

HasParent Filter

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-has-parent-filter.html

Indices Filter

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-indices-filter.html

Query Filter

https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-filter.html

Script based sorting

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_script_based_sorting

Collapsing redundantly nested and/or structures

The Seminearring instance, if deeply nested can possibly produce nested structure that is redundant. Depending on how this affects ES performance, reducing this structure might be valuable.

Runtime checking for cycles in data structures

check for n > 1 occurrences in DFS:

http://hackage.haskell.org/package/stable-maps-0.0.5/docs/System-Mem-StableName-Dynamic.html

http://hackage.haskell.org/package/stable-maps-0.0.5/docs/System-Mem-StableName-Dynamic-Map.html

Photo Origin

Photo from HA! Designs: https://www.flickr.com/photos/hadesigns/