As regular blog readers will probably know, I am always playing around with the search process. On my largest board I now have nearly 350K posts, and anything I can do to make the search process even marginally more effective and efficient can help. My latest idea (which I was up until the “wee hours” a few nights ago building a prototype for) is to grant moderators the ability to mark a topic with an “unsearchable” flag.
If you run or even just participate on a board of any size, you have probably seen this sort of exchange:
noob: Can anyone tell me about “foo”?
member 1: Geez, didn’t you try searching for “foo” first?
member 2: They must not have searched, since a search for “foo and bar” returns everything you need to know
member 3: It’s even a FAQ: Everything Important about Foo Click Here
noob: I will search for “foo” next time
As you probably know, topics are indexed from most recent to oldest. So when Noob #2 comes to the board and actually does a search for “foo”, what are they going to find first? Odds are they will find all of the “why didn’t you search for foo” topics rather than the actual content. So it’s quite frustrating, for everyone involved. Eventually you get two or more pages of “please search” responses, and nobody can ever get to the content.
So the idea behind this MOD is to stop indexing those posts, leaving only the desirable content as searchable. It would be excellent if there was some way to automate this decision process, but for the initial attempt I am sticking with a manual moderator action.
And the best part? As I have prototyped it, this will impact only keyword searches. Other searches (like “my posts” or “last 24 hours” and “view all posts by Dave”) will still work. There are no changes made to search.php at all. The only trick is to add or remove the words into the phpbb_search_wordmatch table during the posting process based on the setting for this flag. I have opted to make this a topic option rather than a post option, but that could be debated.
It’s fairly simple. I pass in to the submit_post() function two additional pieces of information. One is the search status setting from the form, and the other is the search status setting of the topic. If the search status selected on the form is different from the search status stored in the database, then the rows in the search match table are either added or removed accordingly. If the poster is not a moderator, then the search setting from the form and the existing search status are always going to be the same, and the standard process takes place.
I have defaulted the searchable status to On, as that makes the most sense. I am playing with the idea that a board owner might want to be able to specify certain forms as off. This would allow you to mark the “Off Topic” forum topics as all non-searchable and that might save some space. If I were to do that, though, I would have to write code for the moderator control panel “move” option. I would have to build or destroy the search keyword rows based on whether the source / destination forums were searchable or not. I have not decided whether this feature is worth the extra code or not.
So, what do you think? Is this a worthwhile MOD? I am definitely going to implement it on my own board and will try to report back in a few months as to how it has worked out.