$ S = new SphinxClient (); // instantiate APi
$ S -> setConnectTimeout (30); // Set the link timeout
$ s- > AddQuery (); // list query
$ s-> RunQueries (); // execute query list
$ s-> ResetFilters (); // Clear filters
$ s-> BuildExcerpts ($ docs, $ index, $ words); // briefly generate
$ s-> BuildKeywords ($ query, $ index, $ hits); // generate keyword
$ s-> GetLastError (); // error
$ s-> GetLastWarning (); // warning
$ s-> FlushAttributes (); // index brush into hard
$ s-> IsConnectError (); // link error
$ s-> ResetGroupBy (); // reset packet
$ s-> SetFieldWeights (array ( ' sub_title' => 1)); // minimum weight
$ s-> SetIDRange ($ min, $ max); // ID range
$ s-> SetIndexWeights (array ( ' test1' => 1)); // index weights
$ s-> Status ();// service is available
$ s-> UpdateAttributes ($ index, $ attrs, $ values); // update the hard disk index $ S -> SetMatchMode (SPH_MATCH_ANY); // matching pattern $ S-> setMaxQueryTime (3); // query timeout $ s- > SetSelect ($ select); // set the return field $ S -> SetArrayResult (to true); // if there results ID $ S -> as requested by SetLimits (0, 10); // number display: start amount maximum amount starboard shift amount $ s-> SetFilter ( 'target_type' , $ filtervals); // set the filter, the value list $ s-> SetFilterFloatRange ($ attribute, $ min, $ max); // float range $ s-> SetFilterRange ($ attribute, $ min, $ max) ; // specified range $ s-> SetRetries ($ count) ; // set failure retry $ Result = $ S -> Query ( "Good",
"Team" ); // Query
Reproduced in: https: //www.cnblogs.com/liuxl/p/3780809.html