diff --git a/manifest.json b/manifest.json index e474c4e..cadc2a4 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "id": "obsidian-sidekick", "name": "Sidekick", "description": "A companion to identify hidden connections that match your tags and pages", - "version": "1.5.0", + "version": "1.5.1", "minAppVersion": "0.13.8", "author": "Hady Osman", "authorUrl": "https://hady.geek.nz", diff --git a/package.json b/package.json index a1826e2..4735639 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "obsidian-sidekick", - "version": "1.5.0", + "version": "1.5.1", "description": "A companion to identify hidden connections that match your tags and pages", "main": "src/index.ts", "repository": { diff --git a/src/indexing/indexer.ts b/src/indexing/indexer.ts index 3fbc4c5..b3c648c 100644 --- a/src/indexing/indexer.ts +++ b/src/indexing/indexer.ts @@ -37,18 +37,20 @@ export class Indexer extends TypedEmitter { } public getKeywords(): string[] { - // Exclude any keywords associated with active file as we don't want recursive highlighting - const exclusionFile = this.pluginHelper.activeFile; - const keywords = this.documents - .where((doc) => doc.fileCreationTime !== exclusionFile.stat.ctime) + .find({ + fileCreationTime: { $ne: this.pluginHelper.activeFile.stat.ctime }, // Always exclude indices related to active file + }) .map((doc) => doc.keyword); return _.uniq(keywords); } public getDocumentsByKeyword(keyword: string): Document[] { - return this.documents.find({ keyword: keyword }); + return this.documents.find({ + keyword, + fileCreationTime: { $ne: this.pluginHelper.activeFile.stat.ctime }, // Always exclude indices related to active file + }); } public buildIndex(): void {