mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 13:25:12 +00:00
fix(core): disable blocksuite indexer (#7813)
This commit is contained in:
@@ -34,6 +34,8 @@ export class Workspace extends Entity {
|
|||||||
},
|
},
|
||||||
idGenerator: () => nanoid(),
|
idGenerator: () => nanoid(),
|
||||||
schema: globalBlockSuiteSchema,
|
schema: globalBlockSuiteSchema,
|
||||||
|
disableBacklinkIndex: true,
|
||||||
|
disableSearchIndex: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return this._docCollection;
|
return this._docCollection;
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ export class TestingWorkspaceLocalProvider
|
|||||||
blobSources: {
|
blobSources: {
|
||||||
main: blobStorage,
|
main: blobStorage,
|
||||||
},
|
},
|
||||||
|
disableBacklinkIndex: true,
|
||||||
|
disableSearchIndex: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// apply initial state
|
// apply initial state
|
||||||
@@ -95,6 +97,8 @@ export class TestingWorkspaceLocalProvider
|
|||||||
const bs = new DocCollection({
|
const bs = new DocCollection({
|
||||||
id,
|
id,
|
||||||
schema: globalBlockSuiteSchema,
|
schema: globalBlockSuiteSchema,
|
||||||
|
disableBacklinkIndex: true,
|
||||||
|
disableSearchIndex: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
applyUpdate(bs.doc, data);
|
applyUpdate(bs.doc, data);
|
||||||
|
|||||||
@@ -213,7 +213,12 @@ export class AISlidesRenderer extends WithDisposable(LitElement) {
|
|||||||
super.connectedCallback();
|
super.connectedCallback();
|
||||||
|
|
||||||
const schema = new Schema().register(AffineSchemas);
|
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.meta.initialize();
|
||||||
collection.start();
|
collection.start();
|
||||||
const doc = collection.createDoc();
|
const doc = collection.createDoc();
|
||||||
|
|||||||
@@ -187,7 +187,11 @@ export async function replaceFromMarkdown(
|
|||||||
export async function markDownToDoc(host: EditorHost, answer: string) {
|
export async function markDownToDoc(host: EditorHost, answer: string) {
|
||||||
const schema = host.std.doc.collection.schema;
|
const schema = host.std.doc.collection.schema;
|
||||||
// Should not create a new doc in the original collection
|
// 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();
|
collection.meta.initialize();
|
||||||
const job = new Job({
|
const job = new Job({
|
||||||
collection,
|
collection,
|
||||||
|
|||||||
@@ -109,6 +109,8 @@ const getOrCreateShellWorkspace = (workspaceId: string) => {
|
|||||||
main: blobStorage,
|
main: blobStorage,
|
||||||
},
|
},
|
||||||
schema: globalBlockSuiteSchema,
|
schema: globalBlockSuiteSchema,
|
||||||
|
disableBacklinkIndex: true,
|
||||||
|
disableSearchIndex: true,
|
||||||
});
|
});
|
||||||
docCollectionMap.set(workspaceId, docCollection);
|
docCollectionMap.set(workspaceId, docCollection);
|
||||||
docCollection.doc.emit('sync', [true, docCollection.doc]);
|
docCollection.doc.emit('sync', [true, docCollection.doc]);
|
||||||
|
|||||||
@@ -100,6 +100,8 @@ export class CloudWorkspaceFlavourProviderService
|
|||||||
blobSources: {
|
blobSources: {
|
||||||
main: blobStorage,
|
main: blobStorage,
|
||||||
},
|
},
|
||||||
|
disableBacklinkIndex: true,
|
||||||
|
disableSearchIndex: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// apply initial state
|
// apply initial state
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ export class LocalWorkspaceFlavourProvider
|
|||||||
idGenerator: () => nanoid(),
|
idGenerator: () => nanoid(),
|
||||||
schema: globalBlockSuiteSchema,
|
schema: globalBlockSuiteSchema,
|
||||||
blobSources: { main: blobStorage },
|
blobSources: { main: blobStorage },
|
||||||
|
disableBacklinkIndex: true,
|
||||||
|
disableSearchIndex: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// apply initial state
|
// apply initial state
|
||||||
|
|||||||
Reference in New Issue
Block a user