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();
|
.execute();
|
||||||
|
|
||||||
await trx.insertInto('events_fts')
|
if (event.kind === 1) {
|
||||||
.values({ id: event.id, content: event.content })
|
await trx.insertInto('events_fts')
|
||||||
.execute();
|
.values({ id: event.id, content: event.content })
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
|
|
||||||
const tagCounts: Record<string, number> = {};
|
const tagCounts: Record<string, number> = {};
|
||||||
const tags = event.tags.reduce<Insertable<TagRow>[]>((results, tag) => {
|
const tags = event.tags.reduce<Insertable<TagRow>[]>((results, tag) => {
|
||||||
|
|
Loading…
Reference in New Issue