Hi, In the case where a query can use either index, such as the ones you demonstrate, it will use either index. Some queries require particular ordering for the fields, such as Foo.all().filter("col1", 1).order("col2").
-Nick Johnson On Fri, Dec 11, 2009 at 8:16 PM, Sharp-Developer.Net < alexander.trakhime...@gmail.com> wrote: > Nick, I was assuming that when we do queries framework will check > WHERE condition and make request to datastore using index with > properties alphabetically sorted. > > So if I query > Foo.all().filter("col1", 1).filter("col2", 2) > or > Foo.all().filter("col2", 1).filter("col1", 2) > > it will use the same index: > -kind: Foo > properties: > - name: col1 > - name: col2 > > Isn't it the case? > -- > Alex > > On Dec 11, 4:03 pm, "Nick Johnson (Google)" <nick.john...@google.com> > wrote: > > Hi Karthi, > > > > On Thu, Dec 10, 2009 at 2:22 PM, Karthi > > <karthi.palanis...@orangescape.com>wrote: > > > > > > > > > > > > > hi, > > > I am facing problem in index, i already have an index > > > - kind: PrimaryData > > > properties: > > > - name: CellMetadata_9fd8bfa0_2694_4e1a_9d9e_81216f96998d > > > - name: CellMetadata_3b80aec6_b55c_4ece_a5e7_4ee06836c4c9 > > > - name: SheetMetadataId > > > but it is throwing error no matching index found. > > > - kind: PrimaryData > > > properties: > > > - name: CellMetadata_9fd8bfa0_2694_4e1a_9d9e_81216f96998d > > > - name: SheetMetadataId > > > - name: CellMetadata_3b80aec6_b55c_4ece_a5e7_4ee06836c4c9 > > > > > Is order of index is need to be preserved. > > > > These two indexes are not equivalent. Properties are ordered. > > > > -Nick Johnson > > > > > > > > > > > > > > > > > - > > > Karthi > > > > > -- > > > > > You received this message because you are subscribed to the Google > Groups > > > "Google App Engine" group. > > > To post to this group, send email to google-appengine@googlegroups.com > . > > > To unsubscribe from this group, send email to > > > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com><google-appengine%2Bunsubscrib > e...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine?hl=en. > > > > -- > > Nick Johnson, Developer Programs Engineer, App Engine > > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration > Number: > > 368047 > > -- > > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to google-appeng...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine+unsubscr...@googlegroups.com<google-appengine%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > > -- Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appeng...@googlegroups.com. To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.