git.iko.soy/typeable/bloodhound
on 5f430a1 help sign in
172 lines 6.4 kB history raw
1Bloodhound [![TravisCI](https://travis-ci.org/bitemyapp/bloodhound.svg)](https://travis-ci.org/bitemyapp/bloodhound) [![Hackage](https://img.shields.io/hackage/v/bloodhound.svg?style=flat)](https://hackage.haskell.org/package/bloodhound)
2==========
4![Bloodhound (dog)](./bloodhound.jpg)
6Elasticsearch client and query DSL for Haskell
7==============================================
9Why?
10----
12Search doesn't have to be hard. Let the dog do it.
14Endorsements
15------------
17"Bloodhound makes Elasticsearch almost tolerable!" - Almost-gruntled user
19"ES is a nightmare but Bloodhound at least makes it tolerable." - Same user, later opinion.
21Version compatibility
22---------------------
24As of version 0.13.0.0, Bloodhound has 2 separate module trees for
25Elasticsearch versions 1 and 5. Import the module that is appropriate
26for your use case. If you would like to add support for another major
27version, open a ticket expressing your intend and follow the pattern
28used for other versions. We weighed the idea of sharing code between
29versions but it just got too messy, especially considering the
30instability of the Elasticsearch API. We switched to a model which
31would allow the persons responsible for a particular protocol version
32to maintain that version while avoiding conflict with other versions.
34See our [TravisCI](https://travis-ci.org/bitemyapp/bloodhound) for a
35listing of Elasticsearch version we test against.
38Stability
39---------
41Bloodhound 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.
43Testing
44---------
46The TravisCI tests are run using [Stack](http://docs.haskellstack.org/en/stable/README.html). 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.
48Steps to run the tests locally:
49 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.
50 2. Install [Stack] (http://docs.haskellstack.org/en/stable/README.html#how-to-install)
51 3. In your local Bloodhound directory, run `stack setup && stack build`
52 4. Start the desired version of Elasticsearch at `localhost:9200`, which should be the default.
53 5. Run `stack test` in your local Bloodhound directory.
54 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`.
57Hackage page and Haddock documentation
58======================================
60<http://hackage.haskell.org/package/bloodhound>
62Elasticsearch Tutorial
63======================
65It'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](https://vimeo.com/106463167).
67Examples
68========
70See the [examples](htts://github.com/bitemyapp/bloodhound/tree/master/examples) directory for example code.
73Contributors
74============
76* [Chris Allen](https://github.com/bitemyapp)
77* [Liam Atkinson](https://github.com/latkins)
78* [Christopher Guiney](https://github.com/chrisguiney)
79* [Curtis Carter](https://github.com/ccarter)
80* [Michael Xavier](https://github.com/MichaelXavier)
81* [Bob Long](https://github.com/bobjflong)
82* [Maximilian Tagher](https://github.com/MaxGabriel)
83* [Anna Kopp](https://github.com/annakopp)
84* [Matvey B. Aksenov](https://github.com/supki)
85* [Jan-Philip Loos](https://github.com/MaxDaten)
87Possible future functionality
88=============================
90Span Queries
91------------
93Beginning here: <https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-span-first-query.html>
95Function Score Query
96--------------------
98<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-function-score-query.html>
100Node discovery and failover
101---------------------------
103Might require TCP support.
105Support for TCP access to Elasticsearch
106---------------------------------------
108Pretend to be a transport client?
110Bulk cluster-join merge
111-----------------------
113Might require making a lucene index on disk with the appropriate format.
115GeoShapeQuery
116-------------
118<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-query.html>
120GeoShapeFilter
121--------------
123<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geo-shape-filter.html>
125Geohash cell filter
126-------------------
128<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-geohash-cell-filter.html>
130HasChild Filter
131---------------
133<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-has-child-filter.html>
135HasParent Filter
136----------------
138<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-has-parent-filter.html>
140Indices Filter
141--------------
143<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-indices-filter.html>
145Query Filter
146------------
148<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-query-filter.html>
150Script based sorting
151--------------------
153<https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-sort.html#_script_based_sorting>
155Collapsing redundantly nested and/or structures
156-----------------------------------------------
158The 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.
160Runtime checking for cycles in data structures
161----------------------------------------------
163check for n \> 1 occurrences in DFS:
165<http://hackage.haskell.org/package/stable-maps-0.0.5/docs/System-Mem-StableName-Dynamic.html>
167<http://hackage.haskell.org/package/stable-maps-0.0.5/docs/System-Mem-StableName-Dynamic-Map.html>
169Photo Origin
170============
172Photo from HA! Designs: <https://www.flickr.com/photos/hadesigns/>