I have a View which is linked to a collection where I want to search for documents. I also want to filter results so that only documents which are linked to a particular document in a different collection are shown.
My query looks like this:
with Category
let myCategoryId = first(for c in Category filter c.name == "MyCategoryName" return c._id) for product in ProductView
let n = length(for c in 1..1 outbound product ProductCategory filter c._id == myCategoryId return 1)
filter n > 0
This returns all Products which are linked to the Category "MyCategoryName" through the ProductCategory edge. It works nice, but the filtering by category makes it much slower. Is there any way I can use Arangosearch instead of Filter?