fix(core): disable blocksuite indexer (#7813)

This commit is contained in:
EYHN
2024-08-09 08:24:44 +00:00
parent 3ad5170b71
commit d2b0ee40a8
7 changed files with 23 additions and 2 deletions

View File

@@ -213,7 +213,12 @@ export class AISlidesRenderer extends WithDisposable(LitElement) {
super.connectedCallback();
const schema = new Schema().register(AffineSchemas);
const collection = new DocCollection({ schema, id: 'SLIDES_PREVIEW' });
const collection = new DocCollection({
schema,
id: 'SLIDES_PREVIEW',
disableBacklinkIndex: true,
disableSearchIndex: true,
});
collection.meta.initialize();
collection.start();
const doc = collection.createDoc();

View File

@@ -187,7 +187,11 @@ export async function replaceFromMarkdown(
export async function markDownToDoc(host: EditorHost, answer: string) {
const schema = host.std.doc.collection.schema;
// Should not create a new doc in the original collection
const collection = new DocCollection({ schema });
const collection = new DocCollection({
schema,
disableBacklinkIndex: true,
disableSearchIndex: true,
});
collection.meta.initialize();
const job = new Job({
collection,

View File

@@ -109,6 +109,8 @@ const getOrCreateShellWorkspace = (workspaceId: string) => {
main: blobStorage,
},
schema: globalBlockSuiteSchema,
disableBacklinkIndex: true,
disableSearchIndex: true,
});
docCollectionMap.set(workspaceId, docCollection);
docCollection.doc.emit('sync', [true, docCollection.doc]);

View File

@@ -100,6 +100,8 @@ export class CloudWorkspaceFlavourProviderService
blobSources: {
main: blobStorage,
},
disableBacklinkIndex: true,
disableSearchIndex: true,
});
// apply initial state

View File

@@ -72,6 +72,8 @@ export class LocalWorkspaceFlavourProvider
idGenerator: () => nanoid(),
schema: globalBlockSuiteSchema,
blobSources: { main: blobStorage },
disableBacklinkIndex: true,
disableSearchIndex: true,
});
// apply initial state