Pagination
Users often struggle to find relevant information when faced with long lists of search results. Pagination provides customization to present search results based on individual preferences or application requirements. Upon query, Vectara returns the first 10 most relevant search results by default. However, there are times when this is not enough and you want to offer your users the ability to paginate through results.
To enable pagination, use the offset and limit parameters under the
search object. offset is not required, but it defaults to 0 if you do not specify
a value.
Example: set results to 20 per page
To page through where each page has 20 results, you set offset to 0 and
limit to 20.
1
Example: set results to begin on page 2
Then if your users want to paginate to page 2, you would send offset as
20 and limit to 20, and for each page following, add another 20
to the offset.
1