Hi, maybe adding a 3rd attribute that has a part of the path, which is pretty distinguishable but can be indexed with a good selectivity and used to compare in AQL with `==`is a good addition performance wise?
So you would use the `==` to reduce the result set perfomant with the help of the index, and afterwards filter the reduced result set by the left bound string match. Cheers, Willi On Wednesday, May 15, 2019 at 11:59:18 AM UTC+2, Andreas Jung wrote: > > As part of a CMS migration we store all content as JSON in ArangoDB. > Content objects have to path properties > > _path = '/path/to/my/content/foo.html' > _path2 = ['path', 'to', 'my', 'content', 'foo.html'] > > Basic question: what is the best way to query in AQL for all documents by > where _path matches a particular prefix like '/path' or > '/path/to/my/content'. > I can use FILTER doc._path like '/path/%' but that's not very > efficient...any better idea? > > > > -- 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/4e584b6c-7d71-4378-8004-8900198c1362%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
