I read this thread eager to see if someone would post the obvious solution. And finally someone did:
DaysSinceTheDoor wrote:when it gets back the search for the terms not on the black list it searches through the search results for the dropped words and moves those to the top.
I would replace "moves those to the top" with "discards the rest".
I understand that storing and updating a list of the IDs of all posts containing the word "error" (or a similarly common word) takes too much resources. So having 2 categories of words seems like a good idea.
The unusual words are indexed, which means that for each unusual word, the database stores and updates a list of the IDs of the posts that contains the word. So each search must contain an unusual word (such as "okular").
A search in the database for "okular compile error" would return all posts containing "okular". But the next stage must be do discard each post that does not include "compile" and "error".
In the search input field, this could be visualized by making the common words gray ("okular
compile error").
It would even be possible to handle quoted multiword strings by discarding posts that don't include the quoted string.