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
|
* increase this number to re-index all docs
|
||||||
*/
|
*/
|
||||||
static INDEXER_VERSION = 18;
|
static INDEXER_VERSION = 19;
|
||||||
|
|
||||||
private readonly jobQueue: JobQueue<IndexerJobPayload> =
|
private readonly jobQueue: JobQueue<IndexerJobPayload> =
|
||||||
new IndexedDBJobQueue<IndexerJobPayload>(
|
new IndexedDBJobQueue<IndexerJobPayload>(
|
||||||
|
|||||||
@@ -821,10 +821,20 @@ async function crawlingDocData({
|
|||||||
...commonBlockProps,
|
...commonBlockProps,
|
||||||
content: block.get('prop:latex')?.toString() ?? '',
|
content: block.get('prop:latex')?.toString() ?? '',
|
||||||
});
|
});
|
||||||
} else if (
|
} else if (flavour === TableModelFlavour) {
|
||||||
bookmarkFlavours.has(flavour) ||
|
const contents = Array.from<string>(block.keys())
|
||||||
flavour === TableModelFlavour
|
.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({
|
blockDocuments.push({
|
||||||
...commonBlockProps,
|
...commonBlockProps,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user