Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

index.yaml is not updating

I expect the index.yaml file to update with the necessary indices when I run queries in my development environment. It claims that it is updating this file in the dev server log, but the file doesn't actually change. Any idea what might be going on?

Here is the entire index.yaml file:

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.

The log has several of these lines at the points where I would expect it to add a new index:

INFO     2010-06-20 18:56:23,957 dev_appserver_index.py:205] Updating C:\photohuntservice\main\index.yaml

Not sure if it's important, but I'm using version 1.3.4 of the AppEngine SDK.

like image 630
Joe Ludwig Avatar asked Jun 20 '10 19:06

Joe Ludwig


2 Answers

Are you certain you're running queries which need composite indexes to be built? Any queries that are on single properties will be served with the default indexes, and won't need index.yaml entries, and any queries that only use equality filters on multiple properties will be executing using a merge-join strategy that doesn't require building custom indexes.

Unless you're getting NeedIndexErrors thrown in production (without a message about the existing indexes not allowing the query to run efficiently enough), your empty index.yaml may be perfectly fine.

like image 177
Wooble Avatar answered Oct 21 '22 10:10

Wooble


There is an issue that Python SDK on Linux doesn't regenerate index.yaml that was created on Windows. It may be related to your case, but it seems that you just don't really have queries that cause automatic index creation in SDK.

like image 22
anatoly techtonik Avatar answered Oct 21 '22 09:10

anatoly techtonik