Download the PHP package mediashowroom/sphinxsearch-bundle without Composer
On this page you can find all versions of the php package mediashowroom/sphinxsearch-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mediashowroom/sphinxsearch-bundle
More information about mediashowroom/sphinxsearch-bundle
Files in mediashowroom/sphinxsearch-bundle
Package sphinxsearch-bundle
Short Description Sphinx search bundle for Symfony 2
License BSD-2-Clause
Homepage https://github.com/timewasted/Search-SphinxsearchBundle
Informations about the package sphinxsearch-bundle
About SphinxsearchBundle
Installation:
- Download the bundle
- Configure the bundle
Step 1: Download the bundle
How you actually download the bundle is entirely up to you. The easiest way is to grab it from packagist.org.
Step 2: Configure the bundle
At least one index must be defined, and you may define as many as you like.
In the above sample configuration, Categories
is used as a label for the index named %sphinxsearch_index_categories%
(as defined in your sphinxsearch.conf
). This allows you to avoid having to hard code raw index names inside of your code.
Usage examples:
The most basic search, using the above configuration as an example, would be:
This performs a search for search query
against the index labeled Items
. The results of the search are stored in $searchResults
.
You can also perform more advanced searches, such as:
This would again search Items
for search query
, but now it will only return up to the first 25 matches and weight the Name
and SKU
fields higher than normal. Note that in order to define a result_offset
or a result_limit
, you must explicitly define both values. Also, this search will use the Extended query syntax, and exclude all results with a disabled
attribute set to 1.