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 <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
5c75e87ed5
commit
3a37a6c18e
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user