...ce, null given in E:\soft\PHPnow-1.5.6\htdocs\phpstudy\fenci.php on line 5 Array ( [0] => Array ( [word] => � [off] => 0 [len] => 1 [idf] => 0 [attr] => un ) ) Array ( [0] => Array ( [word] => 戏 [off] => 1 [len] => 2 [idf] => 0 [attr] => un ) [1] => Array ( [word] => 适 [off] => 3 [len] => 2...
...index = $xs->index; while (true) { $wikis = $wiki_repo->find(array("query" => array("created_at" => array('$gt' => $wiki_date)), "sort" => array("created_at" => 1), "limit" => 100)); if (!$wikis) break; foreach ($wikis as $wiki) { $array = array( ...
...: 40KB/sec 在PHP里面运行后:显示 我|是|一|个|中|国|人|Array ( [0] => Array ( [word] => 我 [off] => 0 [len] => 3 [idf] => 0 [attr] => un ) [1] => Array ( [word] => 是 [off] => 3 [len] => 3 [idf] => 0 [attr] => un ) [2] => Array ( [word] => 一 [off] => 6 [len] => 3 [idf] => 0 [...
... $index->openBuffer(); foreach ($wikis as $wiki) { $array = array( 'pid' => (string)$wiki->getId(), 'title' => $wiki->getTitle(), 'tag' => is_array($wiki->getTags()) ? implode(' ', $wiki->getTags()) : $wiki->getTags(), ...
...ivate] => [_scheme:private] => XSFieldScheme Object ( [_fields:private] => Array ( [newsid] => XSFieldMeta Object ( [name] => newsid [cutlen] => 0 [weight] => 1 [type] => 10 [vno] => 0 [tokenizer:private] => full [flag:private] => 1 ) [title] => XSFieldMeta Object ( [name] => title [cutlen] => 0 [we...
...多字段搜索呢? 我的方法: [php] public function getShopRows($array = array()){ Yii::import('application.vendors.sdk.php.lib.XS'); $xs = new XS('shop'); $query = "regionId:".$array['regionId']; //return $query;exit; $ShopDoc = $xs->search->setCharset...
...>getFieldId() : $this->xs->getField($field); // get commands $cmds = array(); $terms = is_array($term) ? array_unique($term) : array($term); $terms = XS::convert($terms, 'UTF-8', $this->xs->getDefaultCharset()); foreach ($terms as $term) { $cmds[] = new XSCommand(XS_CMD_INDEX_R...
setFields() 方法 public void setFields(array $data) $data array 字段名及其值组成的数组 源码: sdk/php/lib/XSDocument.class.php#L154 (显示) public function setFields($data){ if ($data === null) { $this->_data = array(); $this->_meta = $this->_terms...
...earch/lib/XS.php'; $this->temp_db = $ci->load->database ( $table_db_array[$table], TRUE ); //建立 XS 对象 $xs = new XS($project_name); //获取 索引对象 $index = $xs->index; $doc = new XSDocument; $result = array(); $result = $this->temp_db->get_where($table, arr...
... 第一次运行的结果:([color=#FF0000][b]正常[/b][/color]) Array ( [0] => Array ( [word] => 印第安那 [times] => 1 [weight] => 15.979999542236 [attr] => ns ) [1] => Array ( [wo...