예제 #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()));
 }