17 Sep
2009
17 Sep
'09
7:18 p.m.
Idx : 200 flag : 5
While find functionally is correct in picking up the correct data, but I am wondering why it doesnt pick the first record (100) which has the flag value set to 5? am I missing something in the indexing definition in the container itself?
You have 2 separate, unrelated indices, so (100, 5) should be the 1st entry on the 2nd index? It doesn't sort by "idx" field. Probably you want to make the second index "composite" (flag, idx) - then you'll get the desired functionality.