humanmade/elasticpress-stopwords
Composer 安装命令:
composer require humanmade/elasticpress-stopwords
包简介
WordPress plugin to integrate WordPress stopwords with ElasticPress mapping.
关键字:
README 文档
README
|
ElasticPress Stopwords Integrates WordPress stopwords and filters with ElasticPress mapping. |
|
| A Human Made project |
ElasticPress stopwords allows developers to customize stopwords functionality of Elastic through linking ElasticPress mapping with WordPress default stopwords list and using related filter wp_search_stopwords.
Requirements
- PHP >= 7.1
- WordPress >= 5.3
- ElasticPress >= 3.4.3 (not tested with older versions)
Getting Set Up
Install Using Composer
composer require humanmade/elasticpress-stopwords
Load the plugin
require_once __DIR__ . '/vendor/humanmmade/elastic-stopwords/plugin.php';
Once you've installed the plugin, use the following code to manage stopwords:
add_filter( 'wp_search_stopwords', function( array $stopwords ) : array { $words_to_remove = [ 'foo' ]; $words_to_add = [ 'bar' ]; return array_merge( array_diff( $stopwords, $words_to_remove ), $words_to_add ); } );
Credits
Created by Human Made with ❤️
Written and maintained by Shady Sharaf.
Interested in joining in on the fun? Join us, and become human!
统计信息
- 总下载量: 3.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2021-01-22