Download the PHP package ripaclub/zf2-sphinxsearch-tool without Composer

On this page you can find all versions of the php package ripaclub/zf2-sphinxsearch-tool. 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 zf2-sphinxsearch-tool

Sphinx Search Tool is an utility that provides a set of tools to create Sphinx Search configurations and data sources.

Latest Stable Version License

Features

References

Requirements

Installation

Standalone installation using composer

  1. Open console (command prompt)

  2. git clone https://github.com/ripaclub/zf2-sphinxsearch-tool.git

  3. cd zf2-sphinxsearch-tool

  4. Run composer install

Installation as ZF2 module using composer

  1. Open console (command prompt)

  2. Go to your application's directory

  3. Add the following to your composer.json

  4. Run a composer update

Usage

The entry point of the tool is the sphinx-tool.php file.

So executing it without commands, i.e. php -f sphinx-tool.php, the help message will be shown.

The usage of this tool is self-explanatory.

You can output (as array) to your console the Sphinx Search settings stored in the ZF2 configuration files (e.g. module.config.php) or in an external configuration file (e.g. sphinx.conf.php).

The Sphinx Search settings here specified will be merged with the default settings contained in ZF2 Sphinx Search Tool.

Also, you can directly write the configuration in the Sphinx Search format.

Note

If you use ZF2 Sphinx Search Tool as a module included into your application you can call its actions from your application entry point.

Configuration

A Sphinx Search configuration can be defined via the sphinxsearch node element into you ZF2 configurations. The children of this node will be merged (i.e. added or substituted to) with defaults provided by ZF2 Sphinx Search Tool.

It can have this children:

Example

An example of PHP array that defines a Sphinx Search configuration:

Create data sources

Suppose you have a result set (e.g. variable $results) obtained from a database (e.g. MongoDB) and you want to index it with Sphinx Search to serve searches through a plain index.

First of all we need to create a data source (e.g. an xmlpipe2 source) that will stream our documents to the standard output (for this purpose we do not specify any URI for the writer).

Suppose to wrap previous code in a controller console action (i.e. sphinx xmlpipe2), we can therefore use it as our xmlpipe_command to populate the Sphinx Search index.

The sphinx.config.php of our project is:

We can now generate the sphinx.conf:

Everything is now ready. We can call the indexer command (i.e. indexer -c sphinx.conf --all --rotate) and serve searches.


Analytics


All versions of zf2-sphinxsearch-tool with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
zendframework/zend-config Version ~2.2
zendframework/zend-filter Version ~2.2
zendframework/zend-console Version ~2.2
zendframework/zend-mvc Version ~2.2
zendframework/zend-modulemanager Version ~2.2
zendframework/zend-text Version ~2.2
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 ripaclub/zf2-sphinxsearch-tool contains the following files

Loading the files please wait ....