Reputation: 36573
I'm trying to get my model to work with multiple spatial indexes. Basically, I have a Route with a source and destination. I want to search my Routes where both Source is WithinRadiusOf and Destination is WithinRadiusOf....but I'm not sure how to do this.
I have my indexes defined...but I only know how to use 1 in a single query.
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(...);
...but I'm not sure how to get the second spatial index into the mix?
I could materialize and do a join in memory afterwards...but I'm wondering if there is a way to get this into the query.
Thanks.
Upvotes: 1
Views: 135
Reputation: 22956
We don't provide a way to do spatial queries on more than one point.
Upvotes: 1