google app engine - Appengine query returning no matching index - Objectify -


i have entities wish ancestor query on , filter parameter ">" operator. entity in question inherits object(i don't think should matter). below entity classes:

@indexed public class validatedobject {  public long timecreated=system.currenttimemillis(); public long timeupdated=system.currenttimemillis();   public long gettimeupdated() {     return timeupdated; } public void settimeupdated(long timeupdated) {     this.timeupdated = timeupdated; } public boolean validated=false; @unindexed public string validatedid; @unindexed private long validatedtime; @unindexed private string creatorid;  public long gettimecreated() {     return timecreated; } public void settimecreated(long timecreated) {     this.timecreated = timecreated; } public boolean isvalidated() {     return validated; } public void setvalidated(boolean validated) {     this.validated = validated; } public string getvalidatedid() {     return validatedid; } public void setvalidatedid(string validatedid) {     this.validatedid = validatedid; } public long getvalidatedtime() {     return validatedtime; } public void setvalidatedtime(long validatedtime) {     this.validatedtime = validatedtime; } public string getcreatorid() {     return creatorid; } public void setcreatorid(string creatorid) {     this.creatorid = creatorid; }  }    @cached @entity public class personnelinfo extends validatedobject{    @id   public string keyname;   @parent key<department> department; private long fdid;  @unindexed private string userkeyname;  private string firstname; private string lastname; @unindexed private string address,city,county,state; @unindexed private string cellphone,homephone,otherphone;   public personnelinfo(){  } public personnelinfo(string email){     keyname=email; }  @override public long gettimeupdated() {     return timeupdated; } @override public void settimeupdated(long time) {     timeupdated=time; }   } 

my query code follows:

query<personnelinfo> q = ofy.query(personnelinfo.class).ancestor(tmp).filter("timeupdated >",     lastsync); 

i getting "no matching index found" error everytime. query works fine without filter. of entities missing "timeupdated" field because changed schema. there entities have been created after schema change timeupdated values , not returned. can gql query on datastore viewer this:

select * personnelinfo timeupdated > 0

and returned entities, makes me believe index created. doing wrong here? appreciated!

you need multi-property index defined in datastore-indexes.xml. should added datastore-indexes-auto.xml when run query in dev mode, result should this:

<datastore-index kind="personnelinfo" ancestor="true">     <property name="timeupdated" direction="asc"/> </datastore-index> 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -