We are Using Nest client in our application . We are trying to modify the code below so that the geo point field count is dynamic not predefined like this.
elasticClient.CreateIndex(inputParameter.IndexName, s => s.NumberOfReplicas(inputParameter.ReplicaCount).NumberOfShards(inputParameter.ShardCount).AddMapping(m => m
.MapFromAttributes()
.Properties(p => p
.GeoPoint(g => g.Name("OriginCoordinate").IndexLatLon())
.GeoPoint(g => g.Name("DestinationCoordinate").IndexLatLon())).IndexAnalyzer(inputParameter.IndexAnalyzer)));
We would want to avoid mentioning geo point fields inline, we tried using PropertiesDescriptor to construct the geo point expression dynamically but could not succeed . Not sure what is going wrong .
Thanks,
Pavan