数据作者更新数据时也自动更新搜索文档
This commit is contained in:
parent
f439e40408
commit
69ef57cdec
|
@ -2146,6 +2146,15 @@ class AuthorController extends Zend_Controller_Action
|
|||
$this->jsonexit($data);
|
||||
return true;
|
||||
}
|
||||
//update search document
|
||||
$search=new Search();
|
||||
//create search view in xunsearch
|
||||
//$sql="select m.uuid,m.title,m.description,x.data,array_to_string(ARRAY( SELECT keyword.keyword FROM keyword WHERE keyword.id = m.id), ', '::text) AS keyword from normalmetadata m left join xml x on m.id=x.id where m.uuid=?";
|
||||
$sql="select * from xunsearch where uuid=?";
|
||||
$sth = $this->db->prepare($sql);
|
||||
$sth->execute(array($row['uuid']));
|
||||
$row = $sth->fetch();
|
||||
$search->update($row);
|
||||
}catch(Exception $e) {
|
||||
$msg = "提交失败,请确认权限后重试";
|
||||
if($this->debug>0)
|
||||
|
|
Loading…
Reference in New Issue