feat(server): Allow configuration of hashtag extraction (#2890)

* feat(server): Allow configuration of hashtag extraction

Before this PR: Hashtags, if enabled, meant the text between `{` and `}`
in the key (if exists and non-empty).

After this PR:

* Hashtags can _still_ be enabled / disabled
* Hashtag open / close char can be specified (and can be the same), like `:` popular with BullMQ
* Hashtag can include `N` closing tags to skip, like `{a}b}c}d` with `2` will return `a}b}c`.

This will allow some existing systems to migrate without code changes in
client code.
This commit is contained in:
Shahar Mike 2024-04-14 15:09:41 +03:00 committed by GitHub
parent f6f7cfb2c9
commit 256e07f8ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 128 additions and 31 deletions

View file

@ -20,6 +20,9 @@ using namespace facade;
using util::fb2::Fiber;
using util::fb2::Launch;
// Test hook defined in common.cc.
void TEST_InvalidateLockTagOptions();
class TestConnection : public facade::Connection {
public:
TestConnection(Protocol protocol, io::StringSink* sink);