Hi, Can we run Near on a Filtered Collection now? I am facing the same issue. My problem statement is to filter a collection and then order it based on Location i.e Lat and long
On Monday, April 22, 2013 at 3:50:09 PM UTC+5:30, Jan Steemann wrote: > > Currently, NEAR() works directly on the index. > That means it will only accept a collection as its first argument, and > not an already-filtered result set. Same for /_api/simple/near. > > There currently is no way to do this with the geo index and the geo > functions or APIs. This is due to the internal implementation of the geo > index, and enabling it would require changing the guts of the index. > > This is not something that can't be done, but I think priority-wise, > working on replication features will be done first, before working on > any of the indexes. > > Best regards > Jan > > > Am 22.04.2013 11:59, schrieb F21: > > I want to filter out a document and then run NEAR() so that NEAR()'s > > results do not include that document: > > Currently, I am doing this: > > FOR u in NEAR(geocol, 48, 48, 100) > > FILTER u._id != "geocol/40629459361" > > return u > > But because we are filtering after NEAR(), it does not produce the > > result we want. In this case, geocol/40629459361 is included in the > > result set of NEAR() and then filtered out. > > What I wish to do is to filter out that document first and then run > > NEAR() on the remaining. Since NEAR expects a collection, the following > > does not work: > > LET u = (FOR x in geocol FILTER x._id != "geocol/40629459361" return x) > > > > FOR y in NEAR(u, 48, 48, 100) > > return y > > Is there any way to achieve this? > -- You received this message because you are subscribed to the Google Groups "ArangoDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
