Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sphinx = new SphinxClient();
- $sphinx->SetServer('localhost', 9313);
- $sphinx->SetLimits(0, 200, 200);
- $sphinx->SetMatchMode(SPH_MATCH_EXTENDED2);
- $sphinx->SetSortMode ( SPH_SORT_RELEVANCE );
- $sphinx->SetRankingMode(SPH_RANK_PROXIMITY_BM25);
- $sphinx->SetFieldWeights(array(
- 'brand_name' => 10,
- 'header' => 9,
- 'code' => 7
- ));
- $sphinxResult = $sphinx->Query(implode(' ', $query_arr));
Add Comment
Please, Sign In to add comment