This commit is contained in:
syuilo
2018-02-26 01:06:21 +09:00
parent 599142acd9
commit 9292df217c
6 changed files with 17 additions and 4 deletions

View File

@@ -121,6 +121,15 @@ async function search(
text: x
});
} else {
const tags = text.split(' ').filter(x => x[0] == '#');
if (tags) {
push({
$and: tags.map(x => ({
tags: x
}))
});
}
push({
$and: text.split(' ').map(x => ({
// キーワードが-で始まる場合そのキーワードを除外する