PHPackages                             kvz/elasticsearch - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Search &amp; Filtering](/categories/search)
4. /
5. kvz/elasticsearch

ActiveCakephp-plugin[Search &amp; Filtering](/categories/search)

kvz/elasticsearch
=================

CakePHP Plugin for ElasticSearch

v1.0.2(11y ago)4410.5k13[3 issues](https://github.com/kvz/cakephp-elasticsearch-plugin/issues)MITPHP

Since Aug 11Pushed 11y ago3 watchersCompare

[ Source](https://github.com/kvz/cakephp-elasticsearch-plugin)[ Packagist](https://packagist.org/packages/kvz/elasticsearch)[ RSS](/packages/kvz-elasticsearch/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

About
-----

[](#about)

Elastic search [was recently used to index the Firefox4 twitter stream](http://pedroalves-bi.blogspot.com/2011/03/firefox-4-twitter-and-nosql.html)and make it searchable. It's based on Lucene and has a simple JSON based interface that you can use to store objects and search through them (for instance even with CURL).

This also makes it easy to have your search indexes be updated in realtime whenever your CakePHP models change data. Cause basically all we'd have to do is do a Curl PUT, DELETE, etc to also make the change in Elastisearch with every afterSave and afterDelete.

This plugin provides

- a behavior to automatically update your indexes
- a shell task to do full index fills
- a generic search component that you can attach to your AppController and will intercept search actions on enabled models. Will return results in JSON format for easy AJAX integration.

Installation
------------

[](#installation)

You'll need the PHP curl libraries installed.

### Server

[](#server)

On [Debian/Ubuntu](http://www.elasticsearch.org/tutorials/2010/07/02/setting-up-elasticsearch-on-debian.html)

### CakePHP Plugin

[](#cakephp-plugin)

As a fake submodule

```
cd ${YOURAPP}/Plugin
git clone git://github.com/kvz/cakephp-elasticsearch-plugin.git Elasticsearch
```

As a real submodule

```
cd ${REPO_ROOT}
git submodule add git://github.com/kvz/cakephp-elasticsearch-plugin.git ${YOURAPP}/Plugin/Elasticsearch
```

Using composer

```
"require": {
	"kvz/elasticsearch": "dev-master"
}
```

Integration
-----------

[](#integration)

### Database

[](#database)

`Config/database.php`

```
