fix: delete old docs index on force re-index (#1778)
This commit is contained in:
parent
6e8fc1247c
commit
0d632eabbf
1 changed files with 6 additions and 0 deletions
|
|
@ -296,6 +296,12 @@ export class DocsService {
|
|||
status: "indexing",
|
||||
};
|
||||
|
||||
// Clear old index if re-indexing.
|
||||
if (reIndex) {
|
||||
console.log("Deleting old embeddings");
|
||||
await this.delete(startUrl.toString());
|
||||
}
|
||||
|
||||
await this.add(siteIndexingConfig.title, startUrl, chunks, embeddings);
|
||||
this.docsIndexingQueue.delete(startUrl.toString());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue