bitemyapp / bloodhound

Haskell Elasticsearch client and query DSL
bitemyapp.com
BSD 3-Clause "New" or "Revised" License
424 stars 118 forks source link

Fixed bug with IndexSettings serialization #59

Closed centromere closed 9 years ago

centromere commented 9 years ago

According to the documentation, IndexSettings are serialized as index.number_of_[shards|replicas], not merely shards|replicas.

centromere commented 9 years ago

The CI test failed due to the test taking longer than 10 minutes to run. It took too long to run because ElasticSearch was operating slowly on account of the defaultIndexSettings specifying three shards and two replicas. If you specify one shard and no replicas like so:


createExampleIndex = createIndex (IndexSettings (ShardCount 1) (ReplicaCount 0)) testIndex

then the test runs much faster. All previous tests did not suffer from this problem because the shards/replicas were never specified correctly to begin with. This is confirmed in the ES logs:

[2015-07-28 19:53:09,181][INFO ][cluster.metadata ] [Bloodsport] [twitter] creating index, cause [api], templates [], shards [5]/[1], mappings []

bitemyapp commented 9 years ago

@centromere Please do go ahead and change the tests to use 1 shard and 0 replicas so the CI passes.

centromere commented 9 years ago

Done.

bitemyapp commented 9 years ago

@centromere thank you again! :+1: :dog: :fireworks: