packages feed

bloodhound 0.12.0.0 → 0.12.1.0

raw patch · 4 files changed

+21/−7 lines, 4 filesdep ~aesonPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: aeson

API changes (from Hackage documentation)

- Database.Bloodhound.Types: instance (Data.Aeson.Types.FromJSON.FromJSON a, Database.Bloodhound.Types.BucketAggregation a) => Data.Aeson.Types.FromJSON.FromJSON (Database.Bloodhound.Types.Bucket a)
+ Database.Bloodhound.Types: instance Data.Aeson.Types.FromJSON.FromJSON a => Data.Aeson.Types.FromJSON.FromJSON (Database.Bloodhound.Types.Bucket a)

Files

bloodhound.cabal view
@@ -1,5 +1,5 @@ name:                bloodhound-version:             0.12.0.0+version:             0.12.1.0 synopsis:            ElasticSearch client library for Haskell description:         ElasticSearch made awesome for Haskell hackers homepage:            https://github.com/bitemyapp/bloodhound@@ -32,7 +32,7 @@   build-depends:       base             >= 4.3     && <5,                        bytestring       >= 0.10.0  && <0.11,                        containers       >= 0.5.0.0 && <0.6,-                       aeson            >= 0.11.1  && <1.1,+                       aeson            >= 0.11.1  && <1.2,                        http-client      >= 0.4.30  && <0.6,                        network-uri      >= 2.6     && <2.7,                        semigroups       >= 0.15    && <0.19,
changelog.md view
@@ -1,3 +1,10 @@+0.12.1.0+===================+* @michaelxavier+  - #162 Allow Aeson 1.1+* @bermanjosh+  - #159 Fix bug with tie breaker json instance for MultiMatchQuery+ 0.12.0.0 =================== This release contains several new APIs, documentation fixes, and some minor type updates, and steps towards ES 2.0 support. Thanks to all of our contributors!
src/Database/Bloodhound/Types.hs view
@@ -2012,7 +2012,7 @@   docCount = dateRangeDocCount   aggs = dateRangeAggs -instance (FromJSON a, BucketAggregation a) => FromJSON (Bucket a) where+instance (FromJSON a) => FromJSON (Bucket a) where   parseJSON (Object v) = Bucket <$>                          v .: "buckets"   parseJSON _ = mempty@@ -2953,7 +2953,7 @@                  , "query" .= query                  , "operator" .= boolOp                  , "zero_terms_query" .= ztQ-                 , "tiebreaker" .= tb+                 , "tie_breaker" .= tb                  , "type" .= mmqt                  , "cutoff_frequency" .= cf                  , "analyzer" .= analyzer@@ -2968,7 +2968,7 @@                            <*> o .: "query"                            <*> o .: "operator"                            <*> o .: "zero_terms_query"-                           <*> o .:? "tiebreaker"+                           <*> o .:? "tie_breaker"                            <*> o .:? "type"                            <*> o .:? "cutoff_frequency"                            <*> o .:? "analyzer"
tests/tests.hs view
@@ -586,7 +586,7 @@   (=~) = (==) instance (ApproxEq a, Show a) => ApproxEq [a] where   as =~ bs = and (zipWith (=~) as bs)-instance (ApproxEq l, Show l, ApproxEq r, Show r) => ApproxEq (Either l r) where+instance (ApproxEq l, ApproxEq r) => ApproxEq (Either l r) where   Left a =~ Left b = a =~ b   Right a =~ Right b = a =~ b   _ =~ _ = False@@ -872,7 +872,14 @@ instance Arbitrary LessThanEq where arbitrary = sopArbitrary; shrink = genericShrink instance Arbitrary GreaterThan where arbitrary = sopArbitrary; shrink = genericShrink instance Arbitrary GreaterThanEq where arbitrary = sopArbitrary; shrink = genericShrink-instance Arbitrary GeoPoint where arbitrary = sopArbitrary; shrink = genericShrink+instance Arbitrary GeoPoint where+  arbitrary = GeoPoint <$> (arbitrary `suchThat` reasonableFieldName) <*> arbitrary+    where+      -- These are problematic for geopoint for obvious reasons+      reasonableFieldName (FieldName "from") = False+      reasonableFieldName (FieldName "to") = False+      reasonableFieldName _ = True+  shrink = genericShrink instance Arbitrary NullValue where arbitrary = sopArbitrary; shrink = genericShrink instance Arbitrary MinimumMatchHighLow where arbitrary = sopArbitrary; shrink = genericShrink instance Arbitrary CommonMinimumMatch where arbitrary = sopArbitrary; shrink = genericShrink