Skip to content

Commit 84862c7

Browse files
committed
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>
1 parent c443626 commit 84862c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/nostrdb.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4372,18 +4372,18 @@ static enum ndb_query_plan ndb_filter_plan(struct ndb_filter *filter)
43724372
return NDB_PLAN_PROFILE_SEARCH;
43734373
}
43744374

4375-
// this is rougly similar to the heuristic in strfry's dbscan
4375+
// TODO: fix multi-author queries
43764376
if (search) {
43774377
return NDB_PLAN_SEARCH;
43784378
} else if (ids) {
43794379
return NDB_PLAN_IDS;
43804380
} else if (relays && kinds && !authors) {
43814381
return NDB_PLAN_RELAY_KINDS;
4382-
} else if (kinds && authors && authors->count <= 10) {
4382+
} else if (kinds && authors && authors->count == 1) {
43834383
return NDB_PLAN_AUTHOR_KINDS;
4384-
} else if (authors && authors->count <= 10) {
4384+
} else if (authors && authors->count == 1) {
43854385
return NDB_PLAN_AUTHORS;
4386-
} else if (tags && tags->count <= 10) {
4386+
} else if (tags && tags->count == 1) {
43874387
return NDB_PLAN_TAGS;
43884388
} else if (kinds) {
43894389
return NDB_PLAN_KINDS;

0 commit comments

Comments
 (0)