From 3a37a6c18e375be523b536b63c9c565cc87da3c7 Mon Sep 17 00:00:00 2001 From: William Casarin Date: Tue, 29 Apr 2025 16:02:04 -0700 Subject: [PATCH] nostrdb: change <=10 author search queries to ==1 These queries are broken anyways. Rely on scans until we fix this Signed-off-by: William Casarin --- nostrdb/src/nostrdb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nostrdb/src/nostrdb.c b/nostrdb/src/nostrdb.c index 9dd0e50c..f500533e 100644 --- a/nostrdb/src/nostrdb.c +++ b/nostrdb/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;