databasearangodbaql

How to retrieve name of the original collection through arangosearch view


I am combining multiple collections into a single arangosearch view, but then once i have found the wanted document i don't know from which collection it has originally come, of course i can add a new field to each document and store the name of the collection there, but i was wondering is there a cheaper and faster way to do this? something like :

FOR doc IN view
RETURN {value : doc.value , collection : doc._collection}

Solution

  • the collection name can be retrieved via the "_id" field of the document.