Skip to content

Commit bce36fd

Browse files
authored
feat:优化全文索引,增加datasetId作为联合索引
增加DatasetID作为联合索引的字段,用于优化全文索引效率
1 parent bb810a4 commit bce36fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/service/core/dataset/data/dataTextSchema.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ const DatasetDataTextSchema = new Schema({
3434

3535
try {
3636
DatasetDataTextSchema.index(
37-
{ teamId: 1, fullTextToken: 'text' },
37+
{ teamId: 1, datasetId: 1, fullTextToken: 'text' },
3838
{
39-
name: 'teamId_1_fullTextToken_text',
39+
name: 'teamId_1_datasetId_1_fullTextToken_text',
4040
default_language: 'none'
4141
}
4242
);

0 commit comments

Comments
 (0)