Details
-
Improvement
-
Resolution: Duplicate
-
Major
-
None
-
Cheshire-Cat
-
None
-
1
Description
I answered a forum post (link) and wrote a simple archiving Eventing function
function OnUpdate(doc, meta) {
|
if (! meta.id.startsWith("doc-wigitcompany-")) return;
|
dst_bkt[meta.id] = doc;
|
}
|
Then I used cbexport to extract my matched documents from a dedicated archive bucket.
/opt/couchbase/bin/cbexport json -c couchbase://127.0.0.1 -u $CB_USERNAME -p $CB_PASSWORD -b archive -f lines -o /tmp/tmp.out.json
|
It became apparent that a simple enhancement to the cbexport tool to allow it to filter by key prefix (or by regex) would allow me to skip the Eventing step I proposed in the forum post altogether.
Perhaps options like -m, --match_key_prefix and -r --match_regex_key could be added. I am assuming that cbexport is a fast DCP consumer here.
Attachments
Issue Links
- duplicates
-
MB-25334 Add regex filtering to cbexport
- Open