diff options
author | Will Holley <willholley@gmail.com> | 2020-01-17 16:39:23 +0000 |
---|---|---|
committer | Will Holley <willholley@gmail.com> | 2020-01-17 16:47:18 +0000 |
commit | 6dd963ac62ddd0a6eacd064ad671d278f75468e9 (patch) | |
tree | 5dce1b815ffe5bc4cf6aba116cb8211e38e6a05c | |
parent | 39c2b976afb2bec1ea9e818e5aa5d3d571bf7305 (diff) | |
download | couchdb-mango_index_consistency_error.tar.gz |
Handle not_found docs in mango text indexesarchive/mango_index_consistency_errormango_index_consistency_error
mango_cursor_text:get_json_docs may return a not_found atom instead
of a Doc. In this case, we should just ignore the hit instead of
attempting to evaluate it against a mango selector.
-rw-r--r-- | src/mango/src/mango_cursor_text.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mango/src/mango_cursor_text.erl b/src/mango/src/mango_cursor_text.erl index 2b42c3995..43ef84e4c 100644 --- a/src/mango/src/mango_cursor_text.erl +++ b/src/mango/src/mango_cursor_text.erl @@ -176,6 +176,10 @@ handle_hits(CAcc0, [{Sort, Doc} | Rest]) -> handle_hits(CAcc1, Rest). +handle_hit(CAcc0, Sort, not_found) -> + CAcc1 = update_bookmark(CAcc0, Sort), + CAcc1; + handle_hit(CAcc0, Sort, Doc) -> #cacc{ limit = Limit, |