Download the PHP package kvz/elasticsearch without Composer

On this page you can find all versions of the php package kvz/elasticsearch. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package elasticsearch

About

Elastic search was recently used to index the Firefox4 twitter stream 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

Installation

You'll need the PHP curl libraries installed.

Server

On Debian/Ubuntu

CakePHP Plugin

As a fake submodule

As a real submodule

Using composer

Integration

Database

Config/database.php

Model

Models/Ticket.php (minimal example)

Models/Ticket.php (with raw sql for huge datasets)

Models/Ticket.php (full example)

Controller

To automatically enable a /<controller>/searcher url on all models that have elastic search enabled, use:

Controller/AppController.php

This component will only actually fire when the Controller->modelClass has the searchable behavior attached.

I chose for this method (vs a dedicated SearchesController) so ACLing is easier. e.g. You may already have an ACL for /tickets/*, so /tickets/search will automatically be restricted the same way.

Generic search

If you want to search on all models, you could make a dedicated search controller and instruct to search on everything like so:

One known limitation is that the Elasticsearch plugin will only look at the first configured Model for configuration parameters like searcher_param and searcher_action.

Try it

From your shell:

From your browser

jQuery integration

Let's look at an integration example that uses jQuery UI's autocomplete.

Assuming you have included that library, and have an input field with attributes id="main-search" and target="/tickets/searcher/q:*{query}*":

Note

Useful commands


All versions of elasticsearch with dependencies

PHP Build Version
Package Version
Requires composer/installers Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kvz/elasticsearch contains the following files

Loading the files please wait ....