# 특정 용어를 제외하고 부정 검색을 하는 방법은?

**URL:** https://meta.discourse.org/t/how-to-do-a-negated-search-excluding-specific-terms/135341
**Category:** Support
**Created:** [12월 7, 2019, 10:08오전 UTC](https://meta.discourse.org/t/how-to-do-a-negated-search-excluding-specific-terms/135341 "2019-12-07T10:08:27Z")
**Posts on this page:** 6
**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: [12월 7, 2019, 10:08오전 UTC](https://meta.discourse.org/t/how-to-do-a-negated-search-excluding-specific-terms/135341/1 "2019-12-07T10:08:27Z")

</div>

본문에 링크를 두 개 이상 넣을 수 없으니 죄송합니다. 아래 검색어는 [Search results for '' - Discourse Meta](https://meta.discourse.org/search) 에서 따옴표 없이 사용했습니다.

[New search operator "not" for tags only](https://meta.discourse.org/t/new-search-operator-not/52087) 에 따르면 검색어를 부정할 수 있는 연산자가 supposedly 존재한다고 하지만, 해당 스레드에서는 최종적으로 어떤 기호가 선택되었는지 명확하지 않으며 최종적인 예시도 없습니다. 온라인에서 이 주제에 대해 찾을 수 있는 거의 유일한 자료입니다.

해당 스레드에서는 “-”, “!”, "~"에 대해 언급하고 있으므로, 모두 시도해 보았습니다:

- "negative search"를 검색하면 “negative” 또는 "search"가 포함된 43개의 결과가 표시되며, 해당 용어가 하이라이트됩니다.
- "-negative search"를 검색하면 “negative” 또는 "search"가 포함된 43개의 결과가 표시되며, "search"만 하이라이트됩니다.
- "-negative -search"를 검색하면 “negative” 또는 "search"가 포함된 43개의 결과가 표시되며, 어느 쪽도 하이라이트되지 않습니다.

따라서 하이라이트의 의미가 무엇이든, “-” 기호는 해당 연산자가 아닙니다.  
"!"로 동일한 테스트를 반복했는데 결과는 동일했습니다.  
"~"의 경우 "negative ~search"는 이전과 동일한 결과를 주었지만, "negative search"는 결과가 0건이었습니다.

그러면 검색에서 특정 용어를 제외하는 방법은 무엇일까요?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [12월 7, 2019, 7:56오후 UTC](https://meta.discourse.org/t/how-to-do-a-negated-search-excluding-specific-terms/135341/2 "2019-12-07T19:56:52Z")

</div>

그 주제가 꽤 혼란스럽다는 데 동의합니다. 월요일에 @jomaxro 님과 여기서 명확히 할 수 있을까요?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12월 7, 2019, 10:21오후 UTC](https://meta.discourse.org/t/how-to-do-a-negated-search-excluding-specific-terms/135341/3 "2019-12-07T22:21:33Z")

</div>

해당 주제는 여러 차례 변경을 거쳤습니다. 혼란스러우셔서 죄송합니다.

현재 부정 연산자는 `-`이며, 태그에만 적용됩니다. 따라서 특정 태그가 없는 주제를 검색할 수는 있지만, 특정 단어, 카테고리 등이 없는 주제를 검색할 수는 없습니다.

부정 연산자는 다음과 같이 사용합니다:

`green tags:eggs -tags:ham` - "green"이라는 단어가 포함된 게시물 중, eggs 태그는 있지만 ham 태그는 없는 게시물을 검색합니다.

다음은 _ **유효하지 않은** _ 검색입니다:

`-green tags:eggs`. 의도는 "green"이라는 단어가 _없는_ eggs 태그가 달린 게시물을 검색하는 것일 수 있지만, 실제로는 "green"이라는 단어가 _있고_ eggs 태그가 달린 게시물을 검색하게 됩니다.

---

<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: [12월 9, 2019, 7:28오후 UTC](https://meta.discourse.org/t/how-to-do-a-negated-search-excluding-specific-terms/135341/4 "2019-12-09T19:28:48Z")

</div>

아, 그건 제 고충을 설명해 주네요. 해당 스레드의 제목을 수정해 주셔서 감사합니다. 이 기능에 대해 찾는 다른 분들에게 도움이 될 것 같습니다.

[Feature - Discourse Meta](https://meta.discourse.org/c/feature/2) 에 기능 요청을 추가해도 괜찮을까요? 혹시 유용할까요?

---

<div class="post-metadata">

### Author: ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)
#### Post date: [12월 9, 2019, 7:32오후 UTC](https://meta.discourse.org/t/how-to-do-a-negated-search-excluding-specific-terms/135341/5 "2019-12-09T19:32:51Z")

</div>

네, 꼭 그렇게 해주세요! 3년 전에 기능 요청을 만들었을 때 제가 필요했던 것은 태그 부정(tag negation)이었기 때문에, 그것만 요청했습니다.

---

<div class="post-metadata">

### Author: ![devnull](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@devnull](https://meta.discourse.org/u/devnull)
#### Post date: [5월 20, 2021, 3:31오후 UTC](https://meta.discourse.org/t/how-to-do-a-negated-search-excluding-specific-terms/135341/6 "2021-05-20T15:31:59Z")

</div>

특정 단어 없이 검색할 수 있는 기능이 계획되어 있나요? 저도 그 기능이 필요합니다. 사람들이 `[DONE] 제목 A`라고 표시하는 주제들이 있는데, 제목에 DONE이라는 단어가 없는 사용자의 모든 주제를 검색할 수 있도록 하고 싶습니다.
