public GeoIndex() { Map = docs => from doc in docs select new { WKT = CreateSpatialField(doc.WKT) }; SpatialIndexes.Add(x => x.WKT, new SpatialOptions { Strategy = SpatialSearchStrategy.GeohashPrefixTree }); }
/// <summary> /// Register a field to be spatially indexed /// </summary> protected void Spatial(Expression <Func <TReduceResult, object> > field, Func <SpatialOptionsFactory, SpatialOptions> indexing) { SpatialIndexes.Add(field, indexing(new SpatialOptionsFactory())); }