If you’re talking about the map functions for a view, when you change the map you should change the version number. That will invalidate the index, which means all old docs saved will in the index will get flushed. You’d want to have the docs purged from the local database first.
By the way, you generally don’t want to emit the whole document when creating a view. Of course there are exceptions, but just wanted to point that out as a best practice.