# Including stop words when searching

**URL:** https://meta.discourse.org/t/including-stop-words-when-searching/127134
**Category:** Support
**Created:** [August 29, 2019, 3:28pm UTC](https://meta.discourse.org/t/including-stop-words-when-searching/127134 "2019-08-29T15:28:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [August 29, 2019, 3:28pm UTC](https://meta.discourse.org/t/including-stop-words-when-searching/127134/1 "2019-08-29T15:28:02Z")

</div>

Is it possible to include «stop words» when searching or at least customize the list of words that are removed from searches?

I have a topic explaining the difference between «cuando + indicative or subjunctive» in Spanish, but apparently «cuando» is categorized as a stop word, so it’s impossible to search for this topic.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 29, 2019, 9:42pm UTC](https://meta.discourse.org/t/including-stop-words-when-searching/127134/2 "2019-08-29T21:42:56Z")

</div>

I am afraid tweaks like this would require a custom Postgres setup, you would have to self host and go to war with Postgres reconfiguring it

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [October 17, 2019, 5:20pm UTC](https://meta.discourse.org/t/including-stop-words-when-searching/127134/3 "2019-10-17T17:20:25Z")

</div>

I’ve figured out that the simplest way to do this is to truncate the Spanish dictionary:

```
./launcher enter app
truncate -s0 /usr/share/postgresql/10/tsearch_data/spanish.stop

```

The problem is that every time I rebuild the image, I have to re-run this command. Is there a way to ensure this command gets run after every rebuild?

---

<div class="post-metadata">

### Author: ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)
#### Post date: [October 20, 2019, 10:41am UTC](https://meta.discourse.org/t/including-stop-words-when-searching/127134/4 "2019-10-20T10:41:03Z")

</div>

> [@Nacho\_Caballero](#):
>
> Is there a way to ensure this command gets run after every rebuild?

Okay, I realized I can easily do this by adding this line to the custom commands section of `app.yml`:

```
  - exec: truncate -s0 /usr/share/postgresql/10/tsearch_data/spanish.stop

```

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 19, 2019, 10:43am UTC](https://meta.discourse.org/t/including-stop-words-when-searching/127134/5 "2019-11-19T10:43:47Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
