humanmade/elasticpress-stopwords 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 4
  • Watchers: 18
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2021-01-22