Renamed CacheManager to DocumentsRepository

This commit is contained in:
Simon Cambier
2024-10-13 18:16:25 +02:00
parent 4ed3b4d612
commit fc19f96dfd
4 changed files with 21 additions and 23 deletions

View File

@@ -79,7 +79,7 @@ export class SearchEngine {
let documents = (
await Promise.all(
paths.map(
async path => await this.plugin.cacheManager.getDocument(path)
async path => await this.plugin.documentsRepository.getDocument(path)
)
)
).filter(d => !!d?.path)
@@ -301,7 +301,7 @@ export class SearchEngine {
const documents = await Promise.all(
results.map(
async result => await this.plugin.cacheManager.getDocument(result.id)
async result => await this.plugin.documentsRepository.getDocument(result.id)
)
)
@@ -377,7 +377,7 @@ export class SearchEngine {
const documents = await Promise.all(
results.map(
async result => await this.plugin.cacheManager.getDocument(result.id)
async result => await this.plugin.documentsRepository.getDocument(result.id)
)
)
@@ -394,7 +394,7 @@ export class SearchEngine {
// Inject embeds in the results
for (const embed of embeds) {
total++
const newDoc = await this.plugin.cacheManager.getDocument(embed)
const newDoc = await this.plugin.documentsRepository.getDocument(embed)
documents.splice(i + 1, 0, newDoc)
results.splice(i + 1, 0, {
id: newDoc.path,