定制 pleio/elasticsearch 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

pleio/elasticsearch

最新稳定版本:v1.0

Composer 安装命令:

composer require pleio/elasticsearch

包简介

An Elasticsearch integration for Elgg.

README 文档

README

This plugin adds full-text search capabilities to your Elgg installation, allowing you to search through entities and annotations (in ELGG 1.8).

Installation and configuration

  1. Install the plugin (and it's dependencies) by running:

     composer require pleio/elasticsearch
    
  2. Add the following configuration to engine/settings.php:

     $CONFIG->elasticsearch = array(
         'hosts' => array(
             '127.0.0.1'
         )
     );
    
     $CONFIG->elasticsearch_index = 'pleio-dev';
    
  3. Activate the plugin through the Elgg admin panel.

  4. Create the index and mappings in Elasticsearch by running:

     php console.php es:index:reset
    

This command will (re-)create the index. All existing content attached to the Elasticsearch will be deleted. From now on all entity CRUD actions will automatically be synced with Elasticsearch.

Bulk synchronisation

The tool comes with a tool to synchronize all existing content with Elasticsearch. Run

php console.php es:sync:all

to start a bulk synchronisation.

File contents indexing

It is also possible to use this tool in conjunction with PleioAsyncTaskHandler and tika-server to search through ElggFile contents.

  1. Download and run the tika-server:

     wget http://www.apache.org/dyn/closer.cgi/tika/tika-server-1.15.jar
     java -jar tika-server-1.15.jar
    
  2. Add the following configuration to engine/settings.php:

     $CONFIG->tika_server = ["localhost", 9998];
    
  3. Make sure the PleioAsyncTaskHandler is running by:

     php console.php async:taskhandler
    

Now when files are added or updated, the contents are indexed automatically.

统计信息

  • 总下载量: 3.21k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 6
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2015-07-10