I was trying to use projection queries, but I had extrange issues using them.I'm trying to use them like this:offset_group = Clients.all( \projection=('name', 'sex', 'birth_date', 'email', 'discount')).order('-__key__').fetch(limit=10, offset=skip_recs)The above code is supposed to bring me the last 10 clients. But actually it does not return the last 10 (actually returns fewer and the actual last record is not included). Also the results seems alternated or maybe even/odd are skipped. If I take off projection param, the result is as spected:offset_group = Clients.all().order('-__key__').fetch(limit=10, offset=skip_recs)I do not know if this is a bug in projection queries or they have to be used in a different way. Please help me. I would like to use projection queries because they are really fast!Kind Regards,Christopher Ramírez--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/Ahgw_iP_mukJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
Does this happen in both the dev_appserver and production?
On Fri, Jun 15, 2012 at 10:28 AM, Christopher Ramírez <blindedb...@gmail.com> wrote:
I was trying to use projection queries, but I had extrange issues using them.I'm trying to use them like this:offset_group = Clients.all( \projection=('name', 'sex', 'birth_date', 'email', 'discount')).order('-__key__').fetch(limit=10, offset=skip_recs)The above code is supposed to bring me the last 10 clients. But actually it does not return the last 10 (actually returns fewer and the actual last record is not included). Also the results seems alternated or maybe even/odd are skipped. If I take off projection param, the result is as spected:offset_group = Clients.all().order('-__key__').fetch(limit=10, offset=skip_recs)I do not know if this is a bug in projection queries or they have to be used in a different way. Please help me. I would like to use projection queries because they are really fast!Kind Regards,Christopher Ramírez
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/Ahgw_iP_mukJ.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.
Note: Specifying this parameter may change the query's index requirements.
the missing records have values for the properties specified in the projection.
an index that hasn't been rebuilt
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/FXLVSDojA1AJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
I just added a few more records. The new ones appear without trouble. Missing records seems to be the ones saved before the projection index was created.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/a6RsWljZlHYJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
App Engine handles index building for you. When you add a new index, it will re-index all entities.
However, it is possible to save entities with an 'unindexed' property, then change the model definition to save the same property but 'indexed.' In this case, the old entities will remain unindexed, while new entities will be indexed. The only way to fix this is to re-write the old entities (as switching the indexing of a property is a schema change, and the datastore does not manage your schema).
On Wed, Jun 20, 2012 at 8:37 AM, Christopher Ramírez <blindedb...@gmail.com> wrote:
No as I remember.How can I rebuild an Index?
On Wednesday, June 20, 2012 2:53:12 AM UTC-6, timh wrote:I just added a few more records. The new ones appear without trouble. Missing records seems to be the ones saved before the projection index was created.If you added a new index, then pre-existing items won't be in the index, unless it's rebuilt. Did you add new properties when you addedthe projection index ?--To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/a6RsWljZlHYJ.
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.