How does the indexing for repeated/list property work, I read somewhere that adding to list will just add an index, and will not count as modified index. Is this still correct?
Is it same for deleting from the list, will deleting a value in list just remove that single index and count as 2 writes?
If what I understand is correct then this
class MyModel(ndb.Model):
my_list = ndb.IntegerProperty(repeated=True)
e = ndb.Key(MyModel, 100).get()
e.my_list.append(50)
e.put()
e.my_list.append(25)
e.put()
e.my_list.remove(50)
e.put()
the updates are,
1 write + 2 index write,
then another,
1 write + 2 index write,
then,
1 write + 2 index write for deletion.
Is that correct?
My final question about this is the 5000 index per entity limit still exists?
Cause I tried running 10k localhost it seems to work.
Additional:
e.my_list.insert(10)
e.put()
Does this just add another index? or the index holds the list index in it making this adjust the whole list?
I figured it out with this
Enabled billing calculator in appstat, never knew about this.
The answer is same as adding, it only does 1 write + 2 index write adding or removing from list wherever it is.
Also having duplicate value in list and removing one only causes 1 write, that means it only store single index for duplicate. Also it doesn’t care about the order in list, reordering will just cause an entitiy put.