db/events: only index kind 1 events in search
This commit is contained in:
parent
02e1a4ce58
commit
5e9a3dd8d1
|
@ -25,9 +25,11 @@ function insertEvent(event: Event): Promise<void> {
|
|||
})
|
||||
.execute();
|
||||
|
||||
await trx.insertInto('events_fts')
|
||||
.values({ id: event.id, content: event.content })
|
||||
.execute();
|
||||
if (event.kind === 1) {
|
||||
await trx.insertInto('events_fts')
|
||||
.values({ id: event.id, content: event.content })
|
||||
.execute();
|
||||
}
|
||||
|
||||
const tagCounts: Record<string, number> = {};
|
||||
const tags = event.tags.reduce<Insertable<TagRow>[]>((results, tag) => {
|
||||
|
|
Loading…
Reference in New Issue