OrangeScape Developer Community

A community for Application Developers on OrangeScape's Platform-as-a-Service

Updating Indexes in GAE for your application

Sometimes when using your application with Google App Engine as runtime, you might come across NeedIndexErrors.  You can solve this by manually uploading the requested indexes, by the following procedure.  You can read more about the need for indexes here

Prerequisites

1.Google App Engine SDK (http://code.google.com/appengine/docs/python/gettingstarted/devenvi...)

One-time setup procedure as defined below

1. Go to the google engine installed folder (Eg : C:\Program Files\Google\google_appengine\new_project_template ) and copy all the files in the folder to any of your system location (ex: C:\sample)

Step by step procedure to update the indexes

1.If the app performs a query that requires an index that hasn't finished building yet, the query will raise an exception.something like as shown below


2. Clear the existing index details in C:\sample\index.yaml and paste the new index details in the file index.yaml and save it.  Make sure you don't remove the first line which says "indexes:"

3.To upload the index configuration for an app, use the following command in command prompt from the location where you have the file index.yaml

appcfg.py - A <appspot id> update_indexes <currentdirectory> ( Eg : appcfg.py -A os-demoapp update_indexes .)

4. Once it is updated the google app engine will build the index and serve for the application. You can check the status of the app's indexes from the "Indexes" section of the Admin Console.

To read more about updating indexes refer to App Engine's docs here.

Views: 215

Comment

You need to be a member of OrangeScape Developer Community to add comments!

Join OrangeScape Developer Community

Comment by Kamal.S on February 20, 2014 at 1:10pm

© 2017   Created by OrangeScape Technologies.   Powered by

Badges  |  Report an Issue  |  Terms of Service