Google App Engine Search for Go: How to Paginate

If I ask Google App Engine Search for Go, for example. for the first 10 results, how do I execute the following query that retrieves the next 10 results? There are no cursors that I know of.

+4
source share
1 answer

EDIT: Good news! . After writing this answer, cursors for the search APIs were completed and published, and therefore they are usually available.

Check type Cursor. The value Cursormay be specified in SearchOptions. Therefore, when you call Index.Search(), you can pass SearchOptionswith the Cursorone received earlier from Iterator.Cursor().

Below is the original answer.


You were unlucky.

, API (, . Java ), Go, API .

. search/search.go: Iterator ( Index.List() Index.Search()) searchCursor ( # 602), , , , .

SearchOptions (search/search.go) ( , / Index.Search()):

// Currently starts at line #464:
type SearchOptions struct {
    ...
    // TODO: cursor, offset, maybe others.
}

, , , . , .

+6

All Articles