nostrdb/Query Plans

Instead of running queries off filters directly, we do some simple
heuristics and determine a reasonable query plan for the given filter.

To test this, also add a kind index query plan and add a test for it.

We still need tag, author, and created_at index scans. This is up next!

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2024-01-05 20:45:45 -08:00
committed by Daniel D’Aquino
parent d598e178c1
commit a45f4d3087
2 changed files with 231 additions and 209 deletions

View File

@@ -399,6 +399,11 @@ struct ndb_block_iterator {
struct ndb_query_result {
struct ndb_note *note;
uint64_t note_id;
};
struct ndb_query_results {
struct cursor cur;
};
// CONFIG