0
此查詢適用於我。日光浴室使用陣列配置突出顯示
$hl = $query->getHighlighting();
$hl->setFields('autocomplete');
$hl->setSimplePrefix('');
$hl->setSimplePostfix('');
$resultSet = $client->select($query);
$highlighting = $resultSet->getHighlighting();
但是,以下似乎不起作用。
$main_query = 'autocomplete:'.$autocomplete;
$select = array(
'query' => $main_query,
'rows' => 1000,
'component' => array('highlighting' => array('fields' =>'autocomplete')));
$query = $client->createSelect($select);
$resultSet = $client->select($query);
$highlighting = $resultSet->getHighlighting();
什麼是我在做我的第二次執行錯誤?