Download the PHP package mfjordvald/sphinxql without Composer

On this page you can find all versions of the php package mfjordvald/sphinxql. 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 sphinxql

SphinxQL library for Laravel 8

This is a simple library that will help you to query a sphinx search server using SphinxQL. My main motivation for putting together this package was to interface easily with Sphinx Real-time indexes on Laravel 8 (Updating rt indexes is ONLY possible using SphinxQL)

As an added bonus, SphinxQL is much more performant than SphinxAPI: http://sphinxsearch.com/blog/2010/04/25/sphinxapi-vs-sphinxql-benchmark/

This package should be compatible with Manticore Search through the foolz/sphinxql-query-builder library.

Installation

Require this package using composer.

Run composer update to pull down Sphinxql. Note that Sphinxql has a dependency on 'FoolCode/SphinxQL-Query-Builder', which does much of the heavy lifting (http://foolcode.github.io/SphinxQL-Query-Builder/)

Now open up app/config/app.php and add the service provider to your providers array.

and the alias:

If you need to override the default configuration options (server/port), please use the config publish command

RT (Real-Time) Indexes in Sphinx

The main differences between the conventional and RT indexes in Sphinx are:

  1. RT uses a "push" model. This means that The task of keeping the index in sync with your database is delegated to your application (remember there is no "indexer" in an RT scheme). So, typically when using an RT index, the index starts out empty and gets populated over time using SphinxQL queries sent by your application.

  2. RT uses more RAM than the conventional indexer approach. Here is an informative blog detailing why: http://www.ivinco.com/blog/sphinx-in-action-good-and-bad-in-sphinx-real-time-indexes/ Also, for more information, be sure to read the internals of RT at : http://sphinxsearch.com/docs/archives/1.10/rt-internals.html In either type of indexing strategy (conventional or RT), for best results, you are recommended to dedicate as much RAM as is possible to your sphinx server. So, the additional RAM requirement should not really deter you from using RT.

  3. A major pro for RT indexes is that they are much easier to setup and manage. There is no need for messing with cron jobs as the "indexer" component is not used (fewer moving parts). No main-delta schemes to worry about (typically). And, ofcourse your index is live with search data instantly!

The more recent versions of Sphinx (2.1.1+) have made enormous strides in making RT indexes production ready: http://sphinxsearch.com/blog/2013/01/15/realtime-index-improvements-in-2-1-1/

The current version uses sensible configuration defaults.. so you can have a clean sphinx.conf file that takes care of the most common scenarios out of the box. http://sphinxsearch.com/docs/current.html#sphinx-deprecations-defaults

Here is the (minimal) sphinx.conf file used in examples below (for rt indexing):

Query Builder Documentation

The SphinxQL query builder package for PHP developed and made available by the kind folks at foolcode is VERY well documented and tested. I strongly recommend you go through their webpage at : http://foolcode.github.io/SphinxQL-Query-Builder/

Misc Usage Tips

Using Laravel 6 model events (http://four.laravel.com/docs/eloquent#model-events), it is trivial to ensure that your model stays in sync with your index!

Consider the following snippets that can be easily added into "created", "updated" and "deleted" events for your model:

Similarly, Replace and delete can be easily handled like so:

A search query can be constructed as:

The above statement returns an array of hits (if found).

View the generated sql statement:

Please refer to the documentation (http://foolcode.github.io/SphinxQL-Query-Builder/) for all available options.

Get the Meta info:

It is also possible to run a raw sql query against the server like so:

You can pass in any valid SphinxQL statement as a parameter to the raw() function.

Integration with Eloquent

This package makes it really easy to integrate the results of a search with database rows. Remember that a sphinx query only returns a hit array containing ID's. It is upto the application to issue queries against the database to retrieve the actual table rows.

The first statement runs the query against the sphinx server and returns an array.

The "with()" function takes the "hit" array returned by the Sphinx search engine and chains it to the "get". The "get()" function has the following signature:

where $name is either:

  1. null - The function simply returns an array of ID's

  2. An eloquent model - The function returns an EloquentCollection containing table rows matching the ids

  3. A string representing a table name - The function returns an array of rows from the table specified (using DB::table('name'))

The $key parameter can be used to change the primary key column name (defaults to 'id')

License

This software licensed under the MIT license

Credit

This is a fork of https://github.com/mnshankar/SphinxQL who did the initial work but seems to have moved on to other projects nowadays.


All versions of sphinxql with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
illuminate/support Version ^8.0|^9.0|^10.0
foolz/sphinxql-query-builder Version ^3.0
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 mfjordvald/sphinxql contains the following files

Loading the files please wait ....