About Elastic Search
An ElasticSearch module for ProcessWire
Modules that have a unique purpose not covered by existing categories.
Close to stable, but users are advised to be cautious and test thoroughly.*
|Date Added||July 24, 2014|
The ElasticSearch module for [ProcessWire CMS/CMF](http://processwire.com/) will add your page content to an ElasticSearch index per site, and give you a convenient way to search it.
* Make sure the PHP cURL library is installed. (apt-get install php5-curl)
* Install [ElasticSearch](http://www.elasticsearch.org/overview/elkdownloads/).
* Install this module, the [usual methods](http://modules.processwire.com/install-uninstall/) apply.
* In the module settings configure your ElasticSearch IP and port, and click save.
* In the module settings click "Index All Pages".
The ElasticSearch module for ProcessWire CMS/CMF will add your page content to an ElasticSearch index per site, and give you a convenient way to search it.
- Information about the author
- Information about Metric Marketing
- The author's blog
- Learn more about ProcessWire
- Make sure the PHP cURL library is installed. (apt-get install php5-curl)
- Install ElasticSearch.
- Install this module, the usual methods apply.
- In the module settings configure your ElasticSearch IP and port, and click save.
- In the module settings click "Index All Pages".
When pages are saved, deleted, trashed, and restored ElasticSearch will be notified accordingly, so after you've clicked "Index All Pages" you shouldn't need to think about it again.
Most content from a page should be seachable: text fields, translated fields, repeaters and filenames.
This module has a function search() that returns a PageArray.
$search_results = $modules->get('ElasticSearch')->search('foo bar');
The MarkupPagerNav module should work out of the box.
$search_results = $modules->get('ElasticSearch')->search('foo bar', $results_per_page); echo "Total results: " . $search_results->getTotal(); echo $search_results->renderPagination();
The search function also takes a 3rd parameter to configure the minimum score required for a page to match.
$search_results = $modules->get('ElasticSearch')->search('foo bar', $results_per_page, 0.05);
By default this module uses a fuzzy_like_this query to match pages. To change that use an array for the 1st parameter when calling search.
$search_results = $modules->get('ElasticSearch')->search(array( 'query' => array( 'match' => array( '_all' => 'foo bar', ), ), ));
This plugin will create an index based on the http host, so if you have many sites one one server they can all safely use the same ElasticSearch server, no special configuration is required to support multiple sites.
Configuring ElasticSearch can be very simple, if running ElasticSearch on a single server you really only need the below configuration in
index.number_of_shards: 1 index.number_of_replicas: 0 discovery.zen.ping.multicast.enabled: false discovery.zen.ping.unicast.hosts: 
No comments yet. Be the first to post!
Your e-mail is kept confidential and not included with your comment. Website is optional.
- Admin Helpers
- Core Modules
- Development Tools
- Field Types
- File Validator
- Input Fields
- Language Modules
- Language Packs
- Markup Generation
- Premium Modules
- Process Modules
- Proof of Concept
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.