I see the new app engine Search API allows us the search and paginate the results but in my case I also need functions to match all content and match all content by category so there is still no way to offset a query that just want page 2 by category i.e. just a simple offset? What is the difference between using a cursor and using the offset?
I read the instructions from https://developers.google.com/appengine/docs/python/search/overview
and I also wonder whether I should make one index for many datastypes or one index per category or per city since my structure is /<region>/<city>/<category> and I need to enable search as well as view all by category and view all by region, by city and by city and by category without search and just filtering.
Thanks for any help
Update
My idea is to store a number with every indexation and that number is the same and when I want to match everything I just manipulate the search to a search for that number on that field and I then can add the filter. Will it work?
Regarding cursor vs. offset: the cursor is more efficient. However, (since there is not yet a ‘reverse’ cursor for the search API like there is for the datastore), use of the offset makes implementation of backwards pagination– to the ‘previous’ page– easier. So, it depends upon your use case.
In a query, it is possible to filter for a specific field value (of any type, including number and string fields). E.g. your query can look something like this:
field1:value1 word1 word2where ‘field1’ is a field name.
If ‘field1’ is numeric, you can also submit queries like this:
field1 > 10(I’m not clear on your question regarding one vs multiple indexes– can you elaborate?)