Return Total number of items found in the result with limit for pagination.

18 views
Skip to first unread message

Fahim

unread,
Jun 30, 2019, 9:43:35 AM6/30/19
to ArangoDB
How can I return the total number of search items found in the result with limit for pagination.
My query is given below. I am also grouping the food item result by restaurant_id.
OR r IN restaurant_food_search
    SEARCH ANALYZER(r.name IN TOKENS('burger', 'text_en'), 'text_en')
    //SORT r.price.current.price LIMIT 0, 15
    COLLECT restaurant = r.restaurant_id into items
    return {restaurant, items: items[*].r, item_count : LENGTH(items[*].r)}


Reply all
Reply to author
Forward
0 new messages