function _search($type, $qes, $sort = null, $start = 0) {
$this->db
->select('id,name,frontCover,type,category,user,author,MRP,sellingPrice,isNew,isRaw,binding,publisherName,publicationYear')->from('books');
$searchKey="";
if(is_array($qes) && count($qes)>0){
$searchKey = "+" . implode(" +", $qes);
}
//full text search
$searchKey = "MATCH name AGAINST ('".$searchKey."')";
$this->db->where("(".$searchKey.")", NULL, FALSE);
$this->db->where('status',1)->limit(30, $start);
$query = $this->db->get();
return $query && $query->num_rows() ? $query->result() : [];
}
我正在使用全文搜索来找到匹配的关键字。但却没有给出正确的答案。我需要获得最大匹配搜索,然后再是其他。 它给了我随机的结果。如何使用与关键字匹配的最大订单数字?