Skip to content

Application for indexing WordPress Trac into an Elasticsearch cluster

Notifications You must be signed in to change notification settings

earnjam/wp-elastracsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WP Elastracsearch

An application for indexing WordPress Trac into an Elasticsearch cluster.

Uses:

This code is used to support the Elasticsearch instance behind https://tracsearch.wpteamhub.com.

Installation

These instructions assume you already have an Elasticsearch cluster up and running.

  1. Clone this repository
git clone git@github.com:earnjam/wp-elastracsearch.git
  1. Install dependencies using composer:
cd wp-elastracsearch
composer install
  1. Rename or copy config-sample.php to config.php and update the values as required.

Note: This script uses Trac's XML-RPC API to pull ticket data, which requires authentication.

I would recommend creating a new wordpress.org account to be used for this purpose in order to separate it from any personal account.

  • username and password are for the wordpress.org account to be used
  • hosts is an array of your Elasticsearch cluster nodes
  • index defaults to wptrac, but can be named anything
  • type should stay as _doc unless you are using an older version of Elasticsearch that still supports custom document types.
  1. Run the create-index.sh script to set up the required index and proper mapping types
./bin/create-index.sh
  1. Build the initial index. Note: This will take several hours to index all 45000+ tickets
./bin/build-index
  1. Set up a cron task to update the index using the update-index script.

About

Application for indexing WordPress Trac into an Elasticsearch cluster

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published