Domanda

In the past I was using the following to find all the newest video in my database, however after moving to my new server it no longer seems to work. I've tried to play around with the settings in sphinx.conf but to no avail. I need to search for empty terms to find various things such as the newest videos, the total video count etc. Hope someone can help!

$client = new SphinxClient();
        // Set search options
        $client->SetServer('localhost', 9312);
        $client->SetConnectTimeout(1);
        $client->SetArrayResult(true);
        $client->SetLimits($offset, $VIDEOS_PER_PAGE, $offset+$VIDEOS_PER_PAGE);
        $client->SetSortMode(SPH_SORT_ATTR_DESC,"date");
        // Query the index
        $results = $client->query('',"test1");
È stato utile?

Soluzione

Check if enable_star is set to 1 in your config

http://sphinxsearch.com/docs/archives/1.10/conf-enable-star.html

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top