bitemyapp / bloodhound

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

Fix an example. #143

Closed 23Skidoo closed 8 years ago

23Skidoo commented 8 years ago

No need to specify the mapping name twice, since putMapping does PUT /$INDEXNAME/_mappings/$MAPPINGNAME and you give it an IndexName and a MappingName. In fact, specifying the mapping name here breaks upsert semantics (you get Root type mapping not empty after parsing! exception when trying to add the same mapping twice).

23Skidoo commented 8 years ago

I test with ES 1.7, so this was broken in ES < 2 already, despite what documentation says.

23Skidoo commented 8 years ago

Also updated tests and made some other small fixes.

23Skidoo commented 8 years ago

Interesting, the UpdatableIndexSetting roundtrip property seems to have been broken by the

instance ApproxEq Char where
+  (=~) = (==)

change. Not sure how to fix.

bitemyapp commented 8 years ago

Not sure how to fix.

/cc @MichaelXavier Didn't you need ApproxEq for something?

23Skidoo commented 8 years ago

Couldn't reproduce the failure locally with ./dist/build/tests/tests --seed 47535321.

23Skidoo commented 8 years ago

@bitemyapp I backed out the GHC 8 compatibility fix, so this should be now good to go.

bitemyapp commented 8 years ago

@23Skidoo thank you!