the docs in MongoDB say:
- In order to actually create indexes the dev_appserver must be run with
the --require-indexes option. Running with this option will probably
add significant overhead, since each time the dev_appserver checks to
see if it should create an index a query is performed.
When I grepped require-indexes the only match I got was in this
README.rst file. In typhoonae/__init__.py the class is instantiated,
and if I manually set the require_indexes argument to True, then I got
an error in the python code (I guess it was coded against an outdated
version of mongodb).
The index is not created, however.
I just added them in the mongodb console, is there an automatic way to
create the indexes from index.yaml?
Cheers,
--
Joaquin Cuenca Abela
That sounds like a good idea. While we're talking about it, TAE will
complain if we try to do a query like this:
Foo.ancestor(parent_key).sort('-__key__')
or simply this:
Foo.sort('-__key__')
These two queries can be served by the default index on _id of
mongodb. I'm not familiar enough with this part of the code, do you
know if it's easy enough to convince the mongodb driver to go ahead
without the extra index (other than disabling the required_index
flag)?
--
Joaquin Cuenca Abela
I was actually using Foo.all().ancestor(parent_key).order('-__key__').
This query will need an index:
- kind: Foo
ancestor: yes
- name: __key__
direction: desc
The MongoDB backend can solve this query with its native index {"_id":
1}, it doesn't need any extra index.
Thinking about it, my only question is, if you generate MongoDB
indexes automatically from index.yaml declarations (something that is
still not possible, but it's easy as you showed), what kind of index
will be generated by the above index.yaml? Is the driver able to
detect that this index is redundant with the native index on _id?
Cheers,
> --
> You received this message because you are subscribed to the Google
> Groups "typhoonae" group.
> To post to this group, send email to typh...@googlegroups.com
> To unsubscribe from this group, send email to
> typhoonae+...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/typhoonae?hl=en
--
Joaquin Cuenca Abela