I have a situation where a document that is in an index gets updated to a state where I no longer want it to be indexed. My map function is currently just returning, rather than calling emit. The behaviour I’m seeing is that the document is still in the index (in couchbase lite). Is there a way to remove it from the index?
That shouldn’t be happening – if you don’t call emit, the doc won’t be in the index.
Is it possible that the doc’s in conflict and the default revision isn’t the one you’re expecting it to be? Views only index the default revisions of docs.