Skip to content

Commit

Permalink
Ensure GeoLocationFormatter returns GeoLocation type (#4026)
Browse files Browse the repository at this point in the history
The ReindexApiTests were failing on a serialisation roundtrip when dealing with properties that used the GeoLocation type. This manifested due to the inclusion of GeoLocation types in the _source serialisation on commit 5492599

The GeoLocationFormatter was found to be returning a GeoCoordinate type and not a GeoLocation type.
  • Loading branch information
codebrain authored Aug 15, 2019
1 parent 6bc2672 commit 44f4728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Nest/QueryDsl/Geo/GeoLocationFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public GeoLocation Deserialize(ref JsonReader reader, IJsonFormatterResolver for
reader.ReadNextBlock();
}

return new GeoCoordinate(lat, lon);
return new GeoLocation(lat, lon);
}

public void Serialize(ref JsonWriter writer, GeoLocation value, IJsonFormatterResolver formatterResolver)
Expand Down

0 comments on commit 44f4728

Please sign in to comment.