Including stop words when searching

AI-generated summary

Including stop words when searching discussion revolves around customizing the list of stop words in search functionality. Nacho_Caballero initiated the conversation, explaining that certain words like “cuando” are categorized as stop words, making it impossible to search for specific topics.

Nacho_Caballero discovered a solution by truncating the Spanish dictionary using the command truncate -s0 /usr/share/postgresql/10/tsearch_data/spanish.stop. However, this requires manual intervention after every image rebuild.

Nacho_Caballero later found a workaround by adding the command to the custom commands section of app.yml, ensuring it runs automatically after every rebuild. sam previously mentioned that tweaks like this would require a custom Postgres setup and self-hosting.

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.

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

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?

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