nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit 84862c7b71fade3b4a6cd8d4748a5baabeca118b
parent c443626eb1cdd97439212bea12815e4460553d9e
Author: William Casarin <jb55@jb55.com>
Date:   Tue, 29 Apr 2025 16:02:04 -0700

change <=10 author search queries to ==1

These queries are broken anyways. Rely on scans until we fix this

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/nostrdb.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/nostrdb.c b/src/nostrdb.c @@ -4372,18 +4372,18 @@ static enum ndb_query_plan ndb_filter_plan(struct ndb_filter *filter) return NDB_PLAN_PROFILE_SEARCH; } - // this is rougly similar to the heuristic in strfry's dbscan + // TODO: fix multi-author queries if (search) { return NDB_PLAN_SEARCH; } else if (ids) { return NDB_PLAN_IDS; } else if (relays && kinds && !authors) { return NDB_PLAN_RELAY_KINDS; - } else if (kinds && authors && authors->count <= 10) { + } else if (kinds && authors && authors->count == 1) { return NDB_PLAN_AUTHOR_KINDS; - } else if (authors && authors->count <= 10) { + } else if (authors && authors->count == 1) { return NDB_PLAN_AUTHORS; - } else if (tags && tags->count <= 10) { + } else if (tags && tags->count == 1) { return NDB_PLAN_TAGS; } else if (kinds) { return NDB_PLAN_KINDS;