...$this->search($type . ':1'); foreach ($result as $doc) /* @var $doc XSDocument */ { $body = $doc->body; $ret[$body] = $doc->f($type); } $this->restoreDb(); } catch (XSException $e) { if ($e->getCode() != XS_CMD_ERR_XAPIAN) { throw $e; ...
...这些关键词检索到数据,但并非数据的字段值 // 用法与 XSDocument::addTerm() 和 XSDocument::addIndex() 等同 // 通常在 ActiveRecord::beforeSave() 中做这些操作 $model->addTerm('subject', 'hi'); $model->addIndex('subject', '你好,世界'); // 如需删除数据则可...
...lib/XSTokenizer.class.php#L220 (显示) public function getTokens($value, XSDocument $doc = null){ $tokens = array(); $this->setIgnore(true); // save charset, force to use UTF-8 $_charset = self::$_charset; self::$_charset = 'UTF-8'; $words = $this->getResult($value); foreach (...
...ect_name); //获取 索引对象 $index = $xs->index; $doc = new XSDocument; $result = array(); $result = $this->temp_db->get_where($table, array($table_key_array[$table] => $id))->row_array(); if(empty($result)){ $doc->setFields($result); $res = $index->add($doc); ret...