Now i changed my sort order back from title to id. And things are working fine again. i am getting the correct number of rows. So I am sure that there is a problem in Index building. It does say that index serving but it has not indexed my whole data.
Google guys any opinion on it? Thanks, Ravi. On Dec 5, 7:42 am, Ravi Sharma <ping2r...@gmail.com> wrote: > Hi, > After indexing my all queries returning fewer rows. > I have this class > > public class AudioMedia{ > @PrimaryKey > @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) > private Key id; > @Persistent > private String title; > ..... > @Persistent > private String audioTitleExternalId; > > } > > initially i was retruning a list of AudioMedia where > audioTitleExternalId='SomeId' and order by id,and this query was returning > correct result > > But then i thought its better to sort it out by title. > SO i created following index > <datastore-index kind="AudioMedia" ancestor="false" source="auto"> > <property name="audioTitleExternalId" direction="asc"/> > <property name="title" direction="asc"/> > </datastore-index> > > and now i am returning a list of AudioMedia where > audioTitleExternalId='SomeId' and order by title > > The only change in code i did was replacing id with title and creating > indexes. Then i waited for half an hour and indexes were created for 50000+ > rows. But now for any audioTitleExternalId i am getting incorrect number of > AudioMedia rows . > > for example > SELECT * FROM AudioMedia where audioTitleExternalId='7475' > when i run this query in Data Viewer, it returns me 6 rows with title and > audioTitleExternalId for each row as not null. > But through the java code it returns me only 4 rows. Somehow indexing has > made my data lost somewhere or unreachable. > > Can you please advise what is the problem here. > > *Fields audioTitleExternalId and title both are not null in all entities.* > > Thanks, > Ravi. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.