Retrieve global index of element with pagination JPA Postgresql
问题 In my project there is a service that retrieves a list of documents. Till now the way to retrieve them is with pagination object this way we don't send back to frontend all the elements. public Page<Document> findDocumentPage(Pageable pageable) { return this.documentService.findAllByPage(pageable); } The problem is that I need the global index of a document from all pages. For example lets say I have a list of pages with results after query: firstResult:{ page: 1, document_list: [{doc:{ id: a