Make search mechanism pluggable

Same as #366, but without the legacy kludge and config suggestion.