Question

I am currently developing a project which makes use of google app engine. Running the application on my development server using *dev_app_server.py* works perfectly for me, but as soon as I upload the application online I get the following error:

NeedIndexError: no matching index found.
The suggested index for this query is:
- kind: Comment
  properties:
  - name: parent
  - name: date_created
    direction: desc

At first I thought it was because the Indexes still needed to be built as suggested by this page - but it has been days since I first uploaded the application and first got this error. Could anyone given an idea of what could be wrong or what I should look out for to solve this error?

For more details about the error you can access the page directly and see what I mean: http://semiotic-karma-449.appspot.com/album/5741031244955648/view

EDIT I put my index.yaml in a gist so that you can all take a look at it if it helps:

https://gist.github.com/KillaW0lf04/8283313

Était-ce utile?

La solution

Once you change/add/remove index definitions to index.yaml you need to update/push those index definitions up to the instance. appcfg update_indexes which just updates the indexes or appcfg update which will update the app and push any index definitions needs to be run

Autres conseils

The error seems clear: you need an index on the specified fields for the Comment model.

Indexes have to be specified in index.yaml. You should run that code in the dev server, which should automatically generate the entry in that file - but if it doesn't, you should add it manually (by copying/pasting the details from the error message). You'll need to re-deploy your app.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top