Hi,
This may not work for your particular use case, but you can use an
equality filter in conjunction with the key filter, so instead of
something like:
suggestions = Suggestion.all().filter('__key__ >=',
bookmark).order("__key__").fetch(PAGESIZE+1)
you could do:
suggestions = Suggestion.all().filter('title =',
VALUE).filter('__key__ >=',
bookmark).order("__key__").fetch(PAGESIZE+1)
Which would at least allow users to query on a small subset of values
(those that specifically equal a property) and still allow paging on
the results.
-Marzia
On Mon, Jan 26, 2009 at 1:02 PM, kang <[email protected]> wrote:
> Thanks for your reply.
> I've just read the article today and I will have a try. For search result, I
> do not know what query users give and how much result. So, I can not give a
> index for an instance.
>
> On Mon, Jan 26, 2009 at 6:54 AM, Marzia Niccolai <[email protected]> wrote:
>>
>> Hi,
>>
>> There are a couple of reliable ways to do paging with App Engine for
>> arbitrarily sized data sets, both of which are discussed in this
>> article:
>> http://code.google.com/appengine/articles/paging.html
>> And the corresponding sample code:
>>
>> http://code.google.com/p/google-app-engine-samples/source/browse/#svn/trunk/paging
>>
>> The easiest way is to just use key paging, if key ordering is
>> sufficient for your paging needs.
>>
>> I'm not sure what you mean by not being able index a search result,
>> but with the paging methods described in the article, deleting an
>> entity should not affect the ability to page.
>>
>> -Marzia
>>
>> On Sat, Jan 24, 2009 at 1:02 PM, lookon <[email protected]> wrote:
>> >
>> > I've read the discussion about paging and have post some problems. But
>> > I still have some problems.
>> >
>> > If I builds index by myself, I cannot index the search result. And if
>> > I have built index for an object and delete one instance of an object,
>> > the index will be broken.
>> >
>> > If I use the GAE Paginator class (http://appengine-
>> > cookbook.appspot.com/recipe/gae-paginator-class/?
>> >
>> > id=ahJhcHBlbmdpbmUtY29va2Jvb2tyjgELEgtSZWNpcGVJbmRleCI4YWhKaGNIQmxibWRwYm1VdFkyOXZhMkp2YjJ0eUZBc1NDRU5oZEdWbmIzSjVJZ1pFYW1GdVoyOE0MCxIGUmVjaXBlIjlhaEpoY0hCbGJtZHBibVV0WTI5dmEySnZiMnR5RkFzU0NFTmhkR1ZuYjNKNUlnWkVhbUZ1WjI4TTcM)
>> >
>> > Then how to deal with the 1000 result limit in GAE? I cannot page if I
>> > have more than 1000 result. I can write my new paging class, but wish
>> > you can give me some advice.Thanks.
>> > >
>> >
>>
>>
>
>
>
> --
> Stay hungry,Stay foolish.
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---