Skip to content

Commit afe6ab3

Browse files
committed
Fix type name for GeoShape mapping
Closes #925
1 parent 5766d38 commit afe6ab3

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

Diff for: src/Nest/Domain/Mapping/Types/GeoShapeMapping.cs

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@ public class GeoShapeMapping : IElasticType
1010
{
1111
public PropertyNameMarker Name { get; set; }
1212

13-
private TypeNameMarker __type;
1413
[JsonProperty("type")]
15-
public virtual TypeNameMarker Type { get { return (TypeNameMarker)(__type ?? "point"); } set { __type = value; } }
14+
public virtual TypeNameMarker Type { get { return new TypeNameMarker { Name = "geo_shape" }; } }
1615

1716
[JsonProperty("similarity")]
1817
public string Similarity { get; set; }

Diff for: src/Tests/Nest.Tests.Unit/Core/Map/Properties/GeoShapeProperty.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"elasticsearchprojects": {
33
"properties": {
44
"myGeoShape": {
5-
"type": "point",
5+
"type": "geo_shape",
66
"tree": "geohash",
77
"tree_levels": 2,
88
"distance_error_pct": 0.025

0 commit comments

Comments
 (0)