feat: tmp upgrade code (#3559)

* feat: tmp upgrade code

* fulltext search test

* update action
This commit is contained in:
Archer
2025-01-10 14:41:29 +08:00
committed by GitHub
parent 1c0b323b1b
commit fadb3e3ceb
9 changed files with 24 additions and 24 deletions

View File

@@ -29,14 +29,16 @@ const DatasetDataTextSchema = new Schema({
ref: DatasetDataCollectionName,
required: true
},
fullTextToken: {
type: String,
required: true
}
fullTextToken: String
});
try {
DatasetDataTextSchema.index({ teamId: 1, datasetId: 1, fullTextToken: 'text' });
DatasetDataTextSchema.index(
{ teamId: 1, datasetId: 1, fullTextToken: 'text' },
{
partialFilterExpression: { fullTextToken: { $exists: true } }
}
);
DatasetDataTextSchema.index({ dataId: 1 }, { unique: true });
} catch (error) {
console.log(error);