Hi,
am just experimenting with GAE SDK 1.6 to see whether I could use the
new query planner, see this article:
http://code.google.com/appengine/articles/indexselection.html
It's not working for me.
class Event extends Model
{
public Tag tag;
public Project project;
public Date timestamp;
}
class Project extends Model
{
@Owned(mappedBy="project"
public Many<Event> events;
}
This is my query:
Project prj;
...
prj.events.order("tag").order("-timestamp").fetch();
Originally I had a complex index:
<datastore-index kind="Event" ancestor="false" source="manual">
<property name="project" direction="asc"/>
<property name="tag" direction="asc"/>
<property name="timestamp" direction="desc"/>
</datastore-index>
I've tried to replace it with two simple indexes:
<datastore-indexes authoGenerate = "false >
<datastore-index kind="Event" ancestor="false">
<property name="tag" direction="asc"/>
<property name="timestamp" direction="desc"/>
</datastore-index>
<datastore-index kind="Event" ancestor="false">
<property name="project" direction="asc"/>
<property name="timestamp" direction="desc"/>
</datastore-index>
<datastore-indexes />
but I still get the error:
Error: Query
com.google.appengine.api.datastore.dev.LocalCompositeIndexManager
$IndexComponentsOnlyQuery@8f5af10c requires a composite index that is
not defined
Has anyone had success getting rid of complex indexes with the new SDK?