mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 00:56:26 +08:00
feat(server): impl native reader for server (#14100)
This commit is contained in:
@@ -227,15 +227,7 @@ export class IndexerService {
|
||||
this.logger.debug(`doc ${workspaceId}/${docId} is empty, skip indexing`);
|
||||
return;
|
||||
}
|
||||
const MAX_WORKSPACE_SNAPSHOT_SIZE = 1024 * 1024 * 10; // 10MB
|
||||
const result = await readAllBlocksFromDocSnapshot(
|
||||
workspaceId,
|
||||
docId,
|
||||
docSnapshot.blob,
|
||||
workspaceSnapshot.blob.length < MAX_WORKSPACE_SNAPSHOT_SIZE
|
||||
? workspaceSnapshot.blob
|
||||
: undefined
|
||||
);
|
||||
const result = await readAllBlocksFromDocSnapshot(docId, docSnapshot.blob);
|
||||
if (!result) {
|
||||
this.logger.warn(
|
||||
`parse doc ${workspaceId}/${docId} failed, workspaceSnapshot size: ${workspaceSnapshot.blob.length}, docSnapshot size: ${docSnapshot.blob.length}`
|
||||
@@ -277,7 +269,7 @@ export class IndexerService {
|
||||
additional: block.additional
|
||||
? JSON.stringify(block.additional)
|
||||
: undefined,
|
||||
markdownPreview: block.markdownPreview,
|
||||
markdownPreview: undefined,
|
||||
createdByUserId: docSnapshot.createdBy ?? '',
|
||||
updatedByUserId: docSnapshot.updatedBy ?? '',
|
||||
createdAt: docSnapshot.createdAt,
|
||||
|
||||
Reference in New Issue
Block a user