perf: text splitter (#4584)

* perf: text splitter

* update doc
This commit is contained in:
Archer
2025-04-17 19:08:04 +08:00
committed by GitHub
parent cdbc1d5590
commit 22fc7dddfb
7 changed files with 103 additions and 473 deletions

View File

@@ -77,6 +77,7 @@ const formatIndexes = async ({
// Recompute default indexes, Merge ids of the same index, reduce the number of rebuilds
const defaultIndexes = getDefaultIndex({ q, a, indexSize });
const concatDefaultIndexes = defaultIndexes.map((item) => {
const oldIndex = indexes!.find((index) => index.text === item.text);
if (oldIndex) {