You ways to connect data seem suboptimal. If you only want to return products that are linked to "MyCategoryName", why not start your traversal there?
for c in Category filter c.name=='MyCategoryName' for product in 1 inbound c ProductCategory return product.name On Friday, 21 August 2020 at 01:05:01 UTC+10 [email protected] wrote: > 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 > search phrase(product.name, "MyProductName", "text_en") > let n = length(for c in 1..1 outbound product ProductCategory filter > c._id == myCategoryId return 1) > filter n > 0 > return product.name > > 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? > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/arangodb/33b4559e-9c5f-428c-91e8-d112b7df72fdn%40googlegroups.com.
