views:

431

answers:

4

I am currently getting a needs index error on my app engine app: http://www.gaiagps.com/wiki/home. I believe this index should have been created automatically by my index.yaml file (see below).

Googling a bit, I think I just need to wait for my index to be built. Is this correct, or do I need to do something manually? Is there some sort of index-building queue? My tables are very, very small right now.

EDIT: I added the line "indexes:" to my app.yaml, and now app engine reports the index is building, so I think this is fixed. It's weird that this file was wrong considering I've never touched it.

indexes:

# AUTOGENERATED

# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run.  If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED").  If you want to manage some indexes
# manually, move them above the marker line.  The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

- kind: Revision
  properties:
  - name: name
  - name: created

The app works on my dev server, but not in production. However, on my dev console, I have noticed this error (EDIT: THIS ERROR IS GONE NOW THAT I ADDED indexes: to the app.yaml file above):

ERROR    2009-10-18 04:46:51,908 dev_appserver_index.py:176] Error parsing /gaiagps.com/index.yaml:

'NoneType' object is not callable
  in "<string>", line 13, column 3:
    - kind: Revision
      ^
A: 

I believe you'll need to add the index to your app.yaml file. Also, it will take some time to generate the index when you push to AppEngine, as your request to build indexes will simply be thrown into a job queue along with everybody else.

cranley
+1  A: 

Indexes aren't included in the app.yaml file, they need to go in an index.yaml

Kinlan
A: 

This error occurs if the first line of index.yaml, which should have just "indexes:" on it starting in column 1, has been deleted.

Roy Leban
A: 
delete    AUTOGENERATED

# This index.yaml is automatically updated whenever the dev_appserver
# detects that a new type of query is run.  If you want to manage the
# index.yaml file manually, remove the above marker line (the line
# saying "# AUTOGENERATED").  If you want to manage some indexes
# manually, move them above the marker line.  The index.yaml file is
# automatically uploaded to the admin console when you next deploy
# your application using appcfg.py.

this line because when u write this line then web server development automatically create index on each column of model and you mention ur indexes should be on specified coloumn

Dilshad Ahmed