Пример #1
0
            public GeoIndex()
            {
                Map = docs => from doc in docs
                      select new { WKT = CreateSpatialField(doc.WKT) };

                SpatialIndexes.Add(x => x.WKT, new SpatialOptions
                {
                    Strategy = SpatialSearchStrategy.GeohashPrefixTree
                });
            }
Пример #2
0
 /// <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()));
 }