這個外掛並未在最新的 3 個 WordPress 主要版本上進行測試。開發者可能不再對這個外掛進行維護或提供技術支援,並可能會與更新版本的 WordPress 產生使用上的相容性問題。

WP Search with Elasticsearch

外掛說明

A WordPress plugin designed to make working with Elasticsearch and WordPress quick and painless. By Digital Bureau.

Description

WP Search with Elasticsearch is a plugin designed to make adding a powerful search engine to your WordPress site simple.

Simply install the plugin, point it to your Elasticsearch instance, and with a few clicks you will have all of your content set up to work with Elasticsearch!

Features:

  • Easy to set up

  • Index posts from a settings page

  • Robust search algorithms powered by Elasticsearch

  • Functions “like Google” right out of the box

  • Quick indexing and lightning-fast performance that supports up to 50,000 posts

  • Replaces front end search with a simple widget and a fast, mobile-friendly search page

  • No need to be a developer to work with ES! 

Installation

Requirements

  • Elasticsearch 6+
  • PHP 5.6
  • At least 512MB allocated for WordPress

Plugin Install

Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

Install Elasticsearch and allow all requests

  • To set up an Elasticsearch instance from scratch, refer to the official Elasticsearch installation docs here for support and allowing access to your ES instance.

  • A much easier and well supported installation is available from Amazon Web Services. You can follow the 3-minute deployment instructions here.

    • You will need to make sure that your ES instance is set up to allow requests from your WordPress installation.

    -For AWS: Make note of the IP of your WordPress host, and add it to the allowed IP\’s list in the \’modify access policy\’ section.

Set up WP Search with Elasticsearch

  • Once the plugin has been activated, Settings->WP Search with Elasticsearch in the WordPress Admin.

  • Add your information to the \’Available before Index Creation\’ section:

    • Specify the index name, url, port, and what content you would like to add to the search engine.
  • Click \’Save All Changes\’. The page will reload.

  • If you have used the correct info for your ES instance and have allowed your WordPress IP to access it, you should see the cluster information at the top of the screen

    • If you are getting error messages, make sure that your Elasticsearch instance is set up to allow requests, and that you have the correct url and port defined.
    • NOTE: If using AWS, setting access rules will take time to populate correctly, sometimes as long as 15-20 minutes.
  • Once your cluster is connected, scroll to the bottom of the screen and click on the \’Click to Create Index\’ button. You will be notified the index has been created, then the page will reload.

  • Once your index has been created, click on the \’Click to Populate\’ button at the bottom of the screen, you will be notified how many posts have been added to the index, then the page will reload.

Configuration defaults

  • The plugin is automatically set up to function \”like Google\”, where queries in quotes will be treated as a single query, operators like \’and\’ will combine search terms into one search, etc.

  • Any new posts and pages will automatically be added to the search index, any changes to a post will be updated in the index.

Add a widget to your site

  • Under Appearance->Widgets in wp-admin, you can add the \”WP Search with Elasticsearch\” search bar to your site. This overrides the stock search in WordPress.

 

 

螢幕擷圖

使用者評論

2020 年 5 月 7 日
Installed on the latest version of WordPress, filled in the Elasticsearch endpoint, saved and the website goes down. Did not capture the PHP 7.4 errors but were many. Had to delete the folder from wp-content/plugins/ to be able to get back to the website. Judging from the last update date (11 months ago as I write this), this plugin is probably no longer loved… 🙁
2017 年 12 月 13 日
Super easy setup when using AWS’s Elasticsearch servers. Takes the complexity out of integrating Wordpress with Elasticsearch.
閱讀全部 3 則使用者評論

參與者及開發者

以下人員參與了開源軟體〈WP Search with Elasticsearch〉的開發相關工作。

參與者

將〈WP Search with Elasticsearch〉外掛本地化為台灣繁體中文版

對開發相關資訊感興趣?

任何人均可瀏覽程式碼、查看 SVN 存放庫,或透過 RSS 訂閱開發記錄