File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
projects/app/src/pages/api/core/dataset/collection Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import { parsePaginationRequest } from '@fastgpt/service/common/api/pagination';
15
15
import { type DatasetCollectionSchemaType } from '@fastgpt/global/core/dataset/type' ;
16
16
import { MongoDatasetData } from '@fastgpt/service/core/dataset/data/schema' ;
17
17
import { MongoDatasetTraining } from '@fastgpt/service/core/dataset/training/schema' ;
18
+ import { replaceRegChars } from '@fastgpt/global/common/string/tools' ;
18
19
19
20
async function handler (
20
21
req : NextApiRequest
@@ -46,7 +47,7 @@ async function handler(
46
47
...( selectFolder ? { type : DatasetCollectionTypeEnum . folder } : { } ) ,
47
48
...( searchText
48
49
? {
49
- name : new RegExp ( searchText , 'i' )
50
+ name : new RegExp ( ` ${ replaceRegChars ( searchText ) } ` , 'i' )
50
51
}
51
52
: {
52
53
parentId : parentId ? new Types . ObjectId ( parentId ) : null
You can’t perform that action at this time.
0 commit comments