saimcan
saimcan

Reputation: 1762

Sphinx Search and Laravel

Installed this package on my laravel project :

http://packalyst.com/packages/package/scalia/sphinxsearch

Everything went fine during installation. I can't get values from database.

this is config.php file of the package :

<?php

return array (
    'host'    => '127.0.0.1',
    'port'    => 9312,
    'indexes' => array (
        'user_index' => array ( 'table' => 'user', 'column' => 'user_id', 'modelname' => 'User' ),
    )
);

and here's my function, to see the values :

$results = SphinxSearch::search('user_index')->get();

var_dump($results);

and it returns bool(false)

Why i can't get values from my database ?

Thanks in advance.

Upvotes: 1

Views: 2247

Answers (1)

the1dv
the1dv

Reputation: 931

Sphinx search requires the Sphinx search binary to be installed, unfortunately that link you have provided doesn't specify if it installs sphinx as well - I would be surprised if it did so you probably need to install it yourself. Sphinx isn't just a simple plugin that searches on your database - it builds indexes based on queries you provide in the configuration file and then searches those indexes rather than directly searching your database.

Sphinx search can be downloaded here

If you are on Ubuntu / Debian it could even just be as simple as:

sudo apt-get install sphinxsearch

I have an example of a really simple Sphinx Config for the search daemon that you can use as a reference on my Github here

Upvotes: 1

Related Questions