On Sep 16, 10:37 am, Alex Epshteyn <alexander.epsht...@gmail.com>
wrote:
> Suppose you have lots of entities of a certain kind in the datastore
> and you want to change some of their properties (e.g. of type
> StringProperty) to unindexed (whereas they were previously indexed).
>
> Once you set indexed=False on the property, what happens to the
> existing index?  Does it get deleted, lowering your storage bill, or
> does it remain?

Based on Google saying that changing the value of indexed DOES NOT
force a re-index I would guess that every model that was already
indexed before turning it off are still indexed (but I don't know for
sure). Try turning it on, adding an entity, turn it off, then turn it
back on and see if you can query using that index. If you can and you
get your entity then they are not deleting the index (at least not
quickly).

>
> Also what happens if you change the property back to indexed
> (indexed=True)?  Do you have to fetch and re-put all the existing
> entities to get them re-indexed?

Yup. From the docs (http://code.google.com/appengine/docs/python/
datastore/propertyclass.html): "Be careful, though! If you decide
later that you want the property indexed after all, changing it back
to indexed=True will only affect writes from that point onward.
Entities that were originally written with indexed=False will not be
re-indexed."

>
> In other words, do these changes apply to entities already stored or
> do they only apply to new entities stored after the change was made?

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to