yeah, i build my DB from scratch using a key/value store so such a search index has to be added. it has part of it already but it doesn't cover the full filter query space, only pubkey/id/timestamp. it also needs tags and kinds.
the extra index eliminates the need to decode events by allowing queries to effectively search by those criteria and not sift through such inordinately large volumes of data.
i've chalked in a mental note to implement count properly for the near future, it's not a big task really.
Login to reply
Replies (1)
ah got it. Yeah ofc in a key-value store you have to implement that from scratch.
Btw if you ever need a SQLITE package for nostr events, I wrote this
It provides bare bone tables, but in the constructor you are free to add other schemas, or triggers, and you can even change or modify the default Query builder to take advantage of new tables, indices and so on.
GitHub
GitHub - pippellia-btc/nastro: A collection of plug&play and configurable databases for nostr
A collection of plug&play and configurable databases for nostr - pippellia-btc/nastro