mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
Merge branch 'make-search-domain-faster' into 'main'
Make domain:<domain> search faster See merge request soapbox-pub/ditto!604
This commit is contained in:
commit
e3cc6922ae
1 changed files with 3 additions and 2 deletions
|
|
@ -79,10 +79,11 @@ export async function getIdsBySearch(
|
|||
}
|
||||
|
||||
if (domains.size) {
|
||||
const pubkeys = kysely
|
||||
const pubkeys = (await kysely
|
||||
.selectFrom('pubkey_domains')
|
||||
.select('pubkey')
|
||||
.where('domain', 'in', [...domains]);
|
||||
.where('domain', 'in', [...domains])
|
||||
.execute()).map(({ pubkey }) => pubkey);
|
||||
|
||||
query = query.where('pubkey', 'in', pubkeys);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue