NEST API Default value for GeoShapes fields
问题 We are using a filter as per following: filters.Add(fq => fq .Term(t => t .Field(f => f.LocalityId) .Value(locationParams[2])) || fq .GeoShape(g => g .Field("locationShape") .Relation(GeoShapeRelation.Within) .IndexedShape(f => f .Id(searchCriteria.spLocationId) .Index(indexName) .Path("geometry") ) ) ); However, if the geometry field is missing, Elasticsearch throws an exception. Is there anyway to avoid this by using a default (Null Value) in the mapping or any other way. 回答1: It is not