Sphinx搜索在laravel中返回false

I have installed Sphinx Search in laravel using composer and have generated the config file for it

Config

return array (
    'host'    => '127.0.0.1',
    'port'    => 9312,
    'indexes' => array (
        'my_book_index' => array ( 'table' => 'books', 'column' => 'book_id', 'modelname' => 'Books'  ),
    )
);

and when i tried to query from my controller i get the result as false

Query in controller

$results = SphinxSearch::search('t','my_book_index')->get();

dd($results);

Result

bool(false) 

Do it require any additional configuration or why the result is always empty

You have to put search tearm > min_word_len. You can find min_word_len in sphinx server configuration file sphinx.conf. Just try using few more characters.

OR

Set the match mode to Extended.

SphinxSearch::search('t','my_book_index')
              ->setMatchMode(\Sphinx\SphinxClient::SPH_MATCH_EXTENDED)
              ->get();

Make sure you have SphinxSearch running on your server before anything. Scalia's sphinxsearch package is only used to access Sphinx inside Laravel.

I suggest you to check that page that explains how to set up Sphinx.