@@ -872,7 +872,14 @@ instance Arbitrary LessThan where arbitrary = sopArbitrary; shrink = genericShri
872872instance Arbitrary LessThanEq where arbitrary = sopArbitrary; shrink = genericShrink
873873instance Arbitrary GreaterThan where arbitrary = sopArbitrary; shrink = genericShrink
874874instance 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
876883instance Arbitrary NullValue where arbitrary = sopArbitrary; shrink = genericShrink
877884instance Arbitrary MinimumMatchHighLow where arbitrary = sopArbitrary; shrink = genericShrink
878885instance Arbitrary CommonMinimumMatch where arbitrary = sopArbitrary; shrink = genericShrink