I have recently become aware of several serious flaws affecting the utility of the Vim scripts search engine. First of all, it appears that the search engine is logically OR'ing the entered search terms. Not only does this produce extremely counterintuitive search behavior, it also renders the search engine almost totally ineffective at what should be its primary mission: permitting users to find plugins that provide desired functionality.
Consider the following hypothetical scenario...
A Vim user wants to find a script that provides the ability to create arbitrarily highlighted plain text in Vim. To my knowledge, there are only a handful of Vim scripts that offer anything like this type of functionality. As the author of the Txtfmt plugin, I'm a bit partial to that one, so the results I present below will be in terms of it...
An obvious choice of search terms for our hypothetical searcher would be "text highlighting" or "highlighting text". (Indeed, someone looking for this type of functionality posted to the vim_use list with subject "highlighting text" on 20 May 2008.) The resulting search produces 574 hits, with Txtfmt appearing as result #266 (page 14). Most of the results on the first page have nothing to do with highlighting text. Considering that only the most determined searcher (i.e., one prepared to wade through 13 pages of plugins) is likely to find what he's looking for, it is little wonder that users resort to the vim_use list to find plugins.
But suppose that, not easily deterred, our hypothetical searcher thinks to constrain the search a bit in hopes of producing a smaller, more targeted results set. It occurs to him that he doesn't want just any sort of text highlighting capability; rather, he wants to be able to highlight *arbitrary* regions of text, just as he can in a typical word processor. Accordingly, he tries the following search:
"arbitrary text highlighting"
If he's observant at all, he may be surprised to notice that the total number of hits more than doubled with respect to the preceding search for "text highlighting"! There are now 588 hits, and Txtfmt is now result #269 (page 14). In other words, adding the relatively uncommon term "arbitrary", which was intended to pare the results set down a bit, actually made the search *less* selective. Ironically, our hypothetical searcher would have had much better success if he had simply searched for "text"! This search produces only 266 hits, and Txtfmt moves from page 14 to page 8 (result #144).
Interestingly, the optimal permutation of the aforementioned search terms is "arbitrary". By itself, "arbitrary" produces only 20 hits, with Txtfmt appearing on the first and only page as result #6. Needless to say, it is unlikely that a user searching for a plugin providing arbitrary text highlighting capability would think to run a search for "arbitrary".
Although I cannot conceive of any rationale for preferring a logical OR search over a logical AND one, perhaps I'm overlooking something. The only use-case I can imagine that would be better served by logically OR'ing the terms is one in which the desire is to find multiple, unrelated plugins with a single search: hardly the most common use-case, and given the difficulty of finding even one plugin with the search engine, probably not one that should even be undertaken.
Whatever arguments might exist in support of a logical OR search, the fact is, users expect keyword searches to function in a logical AND fashion. Search terms are added to make the search results more exclusive. A search can be made much more selective by adding an uncommon term or two to the set of keywords sought. By contrast, adding an uncommon term to the Vim script search has almost no effect on the results produced. In fact, the results of a Vim script search are determined primarily by the *most* common search term: e.g., "text" in the "arbitrary text highlighting" search described above. A Vim script search that includes a word like "the" will find practically every script on the site. A search for "The Vim Highlighter" (part of Txtfmt's official script name) finds 2123 results.
The second flaw I've noticed in the Vim scripts search engine is that the "script name" field is not included in the search. The full name of the Txtfmt plugin is "Txtfmt (The Vim Highlighter)". A search for "highlighter", however, finds only 9 scripts, and Txtfmt is not among them. Apparently, only the "detailed description" field is searched, and although Txtfmt's description contains "highlight", "highlighted" and "highlighting", "highlighter" appears only in the script name, and hence, is not found by the search. If a plugin's detailed description refers to the plugin as "this plugin" rather than <plugin_name>, a search for the plugin by name would be destined to fail.
Logged In: YES
user_id=57494
Originator: NO
I definitely agree with these points. As it stands I view the search feature of the site to be outright broken. I would also add that it should be possible to optionally constrain the search to just the script name itself.