I'm assuming you're storing entities in the GAE datastore and letting the datastore index the entities for you. The datastore uses a linked-list like index, but you don't have access to the linked list.
I don't think there's a perfect mechanism, but instead of sorting your N items from 1..N, I'd use a large sparse set of numbers (for example, use floats), and evenly distribute your entities across that range. Whenever you sort an item, simply generate a new index value that exists between the two new neighbors.
If you hit a worst case scenario, where the neighbors are too close together, generate new indexes for the neighbors, and so forth. A more advanced system might guarantee that there is a minimum amount of space between entities after every re-sort, and reindex a few extra neighbors proactively.