ask-stop-word-fallback-ensures-nonempty-query
IN premise
`_search_source_chunks` strips stop words from the question before building the FTS5 query, but falls back to all words longer than 1 character if every word is a stop word — ensuring the query is never empty
Summary
When the search function removes common filler words from a question to improve search quality, it has a safety net: if removing those words would leave nothing to search for, it keeps all words that are at least two characters long. This prevents the system from ever attempting an empty search query, which would return no results or cause an error.
Details
| Source | entries/2026/05/11/reasons_lib-ask.md |