Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8045923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:40:18+00:00 2026-06-05T05:40:18+00:00

I have some entities that I wish to do an ancestor query on and

  • 0

I have some entities that I wish to do an ancestor query on and filter a parameter by the “>” operator.
The entity in question inherits another object(I don’t think this should matter). Below are my 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 is as follows:

Query<PersonnelInfo> q = ofy.query(PersonnelInfo.class).ancestor(tmp).filter("timeUpdated >",     lastSync);

I am getting the “no matching index found” error everytime. The query works fine without the filter. Some of the entities are missing the “timeUpdated” field because I changed the schema. There are some entities that have been created after the schema change with timeUpdated values and they are not returned. Also I can do a GQL query on the datastore viewer like this:

select * where FROM PersonnelInfo timeUpdated > 0

and I am returned entities, which makes me believe the index is created. What am I doing wrong here? Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:40:19+00:00Added an answer on June 5, 2026 at 5:40 am

    You need a multi-property index defined in your datastore-indexes.xml. It should be added to datastore-indexes-auto.xml when you run the query in dev mode, but the result should look like this:

    <datastore-index kind="PersonnelInfo" ancestor="true">
        <property name="timeUpdated" direction="asc"/>
    </datastore-index>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Imagine you have an entity that has some relations with other entities and you
I have some entities that have a StringProperty and I would like to query
I have some Entities that look like this: @Entity public abstract class AbstractEntity{ @Id
I have a some JPA entities that inherit from one another and uses discriminator
I am attempting to add some entities that I have created. When I try
In one of my projects, I have some classes that represent entities that cannot
In CoreData, I have the data graph with some entities, and each object is
I have the following two entities: @Entity class Relation{ @ManyToOne private User user; //some
Here I have some entities in core data, for example, Account, and I wish
I have a service with some entities that I would like to expose in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.