Linux 软件免费装

Wp CJK Fulltext Index

开发者 j100002ben
更新时间 2012年5月23日 05:47
PHP版本: 3.1.0 及以上
WordPress版本: 3.1.3
版权: GPLv2 or later
版权网址: 版权信息

标签

text full index fulltext cjk

下载

0.1

详情介绍:

This plugin port the full text index search functionality from mediawiki (ver 1.19.0) to wordpress. It improve the searching speed by using MATCH AGAINST than LIKE and also solve the full text index problem with cjk (Chinese, Japanese, and Korean) words. This plugin will create a new database table with post ID and text content.

安装:

Currently this plugin will not change the original wordpress search function. If you like to use it there are some custom function you need to add to your theme.
  1. hook the "save_post" action to choose which post you need to store full text to this plugin.
cjkfxi_set_post($post->ID, $fulltext); // $fulltext can be $_POST['post_title'] or $_POST['content'] ... etc or combine each together 1. hook the "posts_clauses_request" filter to add additional JOIN and WHERE with the search keywords to the exist SQL pattern. $key = get_query_var('key'); cjkfxi_set_posts_clauses_request($clauses, $key); 1. Remember to remove filter in the "posts_clauses_request" filter function because you just need to run it once. 1. The original WP_Query use SQL_CALC_FOUND_ROWS to calculate the total, if you have lots of post, you can add "no_found_rows" to WP_Query's arguments and do the count yourself by adding second parameter to hook "posts_clauses_request". The example of the "posts_clauses_request" filter: https://gist.github.com/2761739

升级注意事项:

Not yet.

更新日志:

Not yet.