开发者 | msaari |
---|---|
更新时间 | 2024年12月18日 13:10 |
捐献地址: | 去捐款 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.7 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
wp_posts
database table by three). If your hosting setup has a limited amount of space for database tables, using Relevanssi may cause problems. In those cases use of Relevanssi cannot be recommended.
Key features
You can find solutions and answers at the Relevanssi Knowledge Base.
Answers to many common problems can be found from the contextual menu. Just click "Help" in the top right corner of your WordPress admin dashboard on the Relevanssi settings page.
If you the results don't change after installing and activating Relevanssi, the most likely reason is that you have a call to query_posts()
on your search results template. This confuses Relevanssi. Try removing the query_posts()
call and see what happens.
Please read Words with punctuation can't be found. This is a Relevanssi feature, but you can fix it from Relevanssi indexing settings.
See the top of the admin menu. There's 'User searches'.
Relevanssi stores the relevance score it uses to sort results in the $post variable. Just add something like
echo $post->relevance_score
to your search results template inside a PHP code block to display the relevance score.
Relevanssi offers Google-style "Did you mean?" suggestions. See "Did you mean" suggestions in the Knowledge Base for more details.
It's the basic weighing scheme used in information retrieval. Tf stands for term frequency while idf is inverted document frequency. Term frequency is simply the number of times the term appears in a document, while document frequency is the number of documents in the database where the term appears. Thus, the weight of the word for a document increases the more often it appears in the document and the less often it appears in other documents.
Each document database is full of useless words. All the little words that appear in just about every document are completely useless for information retrieval purposes. Basically, their inverted document frequency is really low, so they never have much power in matching. Also, removing those words helps to make the index smaller and searching faster.
relevanssi_cached_post_object
can be used to modify the cached post objects.relevanssi_cached_post_object
filter hook to create them.post_type
query var.relevanssi_forbidden_post_types
filters the list of post types excluded from Relevanssi indexing.relevanssi_forbidden_taxonomies
filters the list of taxonomies excluded from Relevanssi indexing.relevanssi_show_password_protected
controls whether password protected posts are shown in the search results.post_mime_type
query parameter.wp_print_inline_script_tag()
.