git.iko.soy/typeable/bloodhound
on master help sign in
merge
b2c4b96Josh Berman
.travis.yml+2−1
@@ -37,7 +37,8 @@ script:
37 - stack setup
37 - stack setup
38 - stack update
38 - stack update
39 - stack build -j1
39 - stack build -j1
40− - stack test --flag bloodhound:$ESFLAG
40+ - stack test bloodhound:doctests --flag bloodhound:$ESFLAG
41+ - stack test bloodhound:tests --test-arguments="--qc-max-success 2000" --flag bloodhound:$ESFLAG
41
42
42cache:
43cache:
43 directories:
44 directories:
src/Database/V1/Bloodhound/Types.hs+2−2
@@ -2953,7 +2953,7 @@ instance ToJSON MultiMatchQuery where
2953 , "query" .= query
2953 , "query" .= query
2954 , "operator" .= boolOp
2954 , "operator" .= boolOp
2955 , "zero_terms_query" .= ztQ
2955 , "zero_terms_query" .= ztQ
2956− , "tiebreaker" .= tb
2956+ , "tie_breaker" .= tb
2957 , "type" .= mmqt
2957 , "type" .= mmqt
2958 , "cutoff_frequency" .= cf
2958 , "cutoff_frequency" .= cf
2959 , "analyzer" .= analyzer
2959 , "analyzer" .= analyzer
@@ -2968,7 +2968,7 @@ instance FromJSON MultiMatchQuery where
2968 <*> o .: "query"
2968 <*> o .: "query"
2969 <*> o .: "operator"
2969 <*> o .: "operator"
2970 <*> o .: "zero_terms_query"
2970 <*> o .: "zero_terms_query"
2971− <*> o .:? "tiebreaker"
2971+ <*> o .:? "tie_breaker"
2972 <*> o .:? "type"
2972 <*> o .:? "type"
2973 <*> o .:? "cutoff_frequency"
2973 <*> o .:? "cutoff_frequency"
2974 <*> o .:? "analyzer"
2974 <*> o .:? "analyzer"
tests/V1/tests.hs+8−1
@@ -872,7 +872,14 @@ instance Arbitrary LessThan where arbitrary = sopArbitrary; shrink = genericShri
872instance Arbitrary LessThanEq where arbitrary = sopArbitrary; shrink = genericShrink
872instance Arbitrary LessThanEq where arbitrary = sopArbitrary; shrink = genericShrink
873instance Arbitrary GreaterThan where arbitrary = sopArbitrary; shrink = genericShrink
873instance Arbitrary GreaterThan where arbitrary = sopArbitrary; shrink = genericShrink
874instance Arbitrary GreaterThanEq where arbitrary = sopArbitrary; shrink = genericShrink
874instance Arbitrary GreaterThanEq where arbitrary = sopArbitrary; shrink = genericShrink
875−instance Arbitrary GeoPoint where arbitrary = sopArbitrary; shrink = genericShrink
875+instance Arbitrary GeoPoint where
876+ arbitrary = GeoPoint <$> (arbitrary `suchThat` reasonableFieldName) <*> arbitrary
877+ where
878+ -- These are problematic for geopoint for obvious reasons
879+ reasonableFieldName (FieldName "from") = False
880+ reasonableFieldName (FieldName "to") = False
881+ reasonableFieldName _ = True
882+ shrink = genericShrink
876instance Arbitrary NullValue where arbitrary = sopArbitrary; shrink = genericShrink
883instance Arbitrary NullValue where arbitrary = sopArbitrary; shrink = genericShrink
877instance Arbitrary MinimumMatchHighLow where arbitrary = sopArbitrary; shrink = genericShrink
884instance Arbitrary MinimumMatchHighLow where arbitrary = sopArbitrary; shrink = genericShrink
878instance Arbitrary CommonMinimumMatch where arbitrary = sopArbitrary; shrink = genericShrink
885instance Arbitrary CommonMinimumMatch where arbitrary = sopArbitrary; shrink = genericShrink