elastic: update problemId token

This commit is contained in:
undefined committed 2022-09-09 09:43:31 +08:00
1 parent 920b7c9b63
commit 333b96f34c
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -16,10 +16,10 @@ const processDocument = (doc: Partial<ProblemDoc>) => {
}
if (doc.title) {
doc.title = doc.title.replace(/[[\]【】()()]/g, ' ')
.replace(/([a-zA-Z]{2,})/, (a) => `${a} `);
.replace(/([a-zA-Z]{2,})(\d+)/, '$1$2 $1 $2');
}
if (doc.pid) {
doc.pid = doc.pid.replace(/([a-zA-Z]{2,})/, (a) => `${a} `);
doc.pid = doc.pid.replace(/([a-zA-Z]{2,})(\d+)/, '$1$2 $1 $2');
}
return omit(doc, indexOmit);
};