Copied from nostr-tools and modified to use getIndexableTags
https://github.com/nbd-wtf/nostr-tools/blob/a61cde77eacc9518001f11d7f67f1a50ae05fd80/filter.ts
Copied from nostr-tools and modified to use getIndexableTags