mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(core): indexer data loss (#9216)
This commit is contained in:
@@ -143,12 +143,15 @@ export class DataStruct {
|
||||
|
||||
if (nid) {
|
||||
await trx.objectStore('records').delete(nid);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
const indexIds = await trx
|
||||
.objectStore('invertedIndex')
|
||||
.index('nid')
|
||||
.getAllKeys(nid);
|
||||
|
||||
for (const indexId of indexIds) {
|
||||
await trx.objectStore('invertedIndex').delete(indexId);
|
||||
}
|
||||
@@ -266,6 +269,8 @@ export class DataStruct {
|
||||
nodes.push(this.resultNode(record, options, match, nid));
|
||||
}
|
||||
|
||||
console.log(nodes);
|
||||
|
||||
return {
|
||||
pagination: {
|
||||
count: match.size(),
|
||||
|
||||
Reference in New Issue
Block a user