Skip to content
Snippets Groups Projects
Commit 8376b10b authored by syuilo's avatar syuilo
Browse files

#1035

parent 52ea4439
No related merge requests found
......@@ -99,7 +99,9 @@ async function byNative(res, rej, me, text, userId, following, mute, reply, repo
if (text) {
push({
$and: text.split(' ').map(x => ({
text: new RegExp(escapeRegexp(x))
text: x[0] == '-' ? {
$ne: new RegExp(escapeRegexp(x))
} : new RegExp(escapeRegexp(x))
}))
});
}
......
......@@ -5,6 +5,12 @@ p
| キーワードを半角スペースで区切ると、and検索になります。
| 例えば、「git コミット」と検索すると、「gitで編集したファイルの特定の行だけコミットする方法がわからない」などがマッチします。
section
h2 キーワードの除外
p キーワードの前に「-」(ハイフン)をプリフィクスすると、そのキーワードを含まない投稿に限定します。
p 例えば、「gitというキーワードを含むが、コミットというキーワードは含まない投稿」を検索したい場合、クエリは以下のようになります:
code git -コミット
section
h2 オプション
p
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment