mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
fix(core): fix table text content search (#10488)
This commit is contained in:
@@ -32,7 +32,7 @@ export class DocsIndexer extends Entity {
|
||||
/**
|
||||
* increase this number to re-index all docs
|
||||
*/
|
||||
static INDEXER_VERSION = 18;
|
||||
static INDEXER_VERSION = 19;
|
||||
|
||||
private readonly jobQueue: JobQueue<IndexerJobPayload> =
|
||||
new IndexedDBJobQueue<IndexerJobPayload>(
|
||||
|
||||
@@ -821,10 +821,20 @@ async function crawlingDocData({
|
||||
...commonBlockProps,
|
||||
content: block.get('prop:latex')?.toString() ?? '',
|
||||
});
|
||||
} else if (
|
||||
bookmarkFlavours.has(flavour) ||
|
||||
flavour === TableModelFlavour
|
||||
) {
|
||||
} else if (flavour === TableModelFlavour) {
|
||||
const contents = Array.from<string>(block.keys())
|
||||
.map(key => {
|
||||
if (key.startsWith('prop:cells.') && key.endsWith('.text')) {
|
||||
return block.get(key)?.toString() ?? '';
|
||||
}
|
||||
return '';
|
||||
})
|
||||
.filter(Boolean);
|
||||
blockDocuments.push({
|
||||
...commonBlockProps,
|
||||
content: contents,
|
||||
});
|
||||
} else if (bookmarkFlavours.has(flavour)) {
|
||||
blockDocuments.push({
|
||||
...commonBlockProps,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user