开发者

Rewrite/change WordPress search mechanism

I've been looking for a way to change the WordPress searching mechanism. My database has several custom tables, which I want to take i开发者_C百科nto account when searching the site. Also, I wan't to implement a levenshtein function for coming up with lines like "Did you mean [another term]?" when somebody makes a spelling error.

Is there a hook, action or function I can implement or change to allow these kind of functions? Any help is greatly appreciated.

Kind regards,

Reinder


You could just replace the WordPress search with your own search, by replacing your own search box with a custom search box which then calls a function which uses one of these searches. This will allow you to replace the default wordpress search without modifying the core files.

Three possible options would be:

  • MySQL Match Against
  • Sphinx
  • Lucene

I had to do a similar thing for my own WordPress site. I originally went with MySQL match against, but I have since switched to Sphinx. I ran into serious speed issues using MySQL match against, although those problems vanished when I switched to Sphinx.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜