Ignore new special field _r_met
COUCHDB-2655
diff --git a/src/couch_doc.erl b/src/couch_doc.erl
index 6fc9b09..39fe4f3 100644
--- a/src/couch_doc.erl
+++ b/src/couch_doc.erl
@@ -86,6 +86,8 @@
[{<<"_conflicts">>, revs_to_strs(Conflicts)}];
({deleted_conflicts, DConflicts}) ->
[{<<"_deleted_conflicts">>, revs_to_strs(DConflicts)}];
+ ({r_met, Bool}) ->
+ [{<<"_r_met">>, Bool}];
(_) ->
[]
end, Meta).
@@ -193,6 +195,11 @@
% we already got the rev from the _revisions
transfer_fields(Rest,Doc);
+transfer_fields([{<<"_r_met">>, _Bool} | Rest], Doc) ->
+ % _r_met is informational only and has no bearing on
+ % how we'll use the document.
+ transfer_fields(Rest,Doc);
+
transfer_fields([{<<"_attachments">>, {JsonBins}} | Rest], Doc) ->
Atts = [couch_att:from_json(Name, Props) || {Name, {Props}} <- JsonBins],
transfer_fields(Rest, Doc#doc{atts=Atts});