1
我試圖讓我的模型與多個空間索引一起工作。基本上,我有一個路線與來源和目的地。我想搜索我的路線,其中Source是WithinRadiusOf,Destination是WithinRadiusOf ....但我不知道如何做到這一點。Raven DB多空間索引
我有我的索引定義...但我只知道如何在單個查詢中使用1。
Map = routes => from r in routes select new { _ = SpatialIndex.Generate(r.Source.Location.Latitude, r.Source.Location.Longitude) };
Map = routes => from r in routes select new { _ = SpatialIndex.Generate(r.Destination.Location.Latitude, r.Destination.Location.Longitude) };
session.Advanced.LuceneQuery<Route>("Routes/BySource")
.WithinRadiusOf(...);
......但我不知道如何獲得第二個空間索引的混合?
我可以實現並在事後做一個內存連接......但我想知道是否有一種方法可以將這個查詢。
謝謝。
所以你的建議是在事後做一個內存中的連接? – Jeff 2012-08-15 13:13:01