# 在搜索中排除/否定词语

**URL:** https://meta.discourse.org/t/excluding-negating-words-in-search/135992
**Category:** Feature
**Created:** [2019年十二月15日 09:31 UTC](https://meta.discourse.org/t/excluding-negating-words-in-search/135992 "2019-12-15T09:31:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![hannes](https://avatars.discourse-cdn.com/v4/letter/h/f0a364/32.png) [@hannes](https://meta.discourse.org/u/hannes)
#### Post date: [2019年十二月15日 09:31 UTC](https://meta.discourse.org/t/excluding-negating-words-in-search/135992/1 "2019-12-15T09:31:09Z")

</div>

虽然支持对标签进行否定搜索（`-tag:thistag`），但无法在通用搜索中排除某些词语。

“-” 字符通常用于让搜索用户明确列出结果中必须不包含的词语。

在 [Search results for '' - Discourse Meta](https://meta.discourse.org/search) 上运行以下查询并未得到我预期的结果：

- “negative search” 返回 43 条结果，其中包含“negative”和/或“search”，符合预期
- “-negative search” 返回 43 条结果，其中包含“negative”和/或“search”，我预期不应包含“negative”的结果
- “-negative -search” 返回 43 条结果，其中包含“negative”和/或“search”，我预期应返回所有既不包含“negative”也不包含“search”的结果

请在通用搜索中支持在任意词语前使用“-”来排除或否定该词语。
