... =8383 server.search =8384 [user_id] type = id [username] index = self tokenizer = full [password] index = both [email] index = both 后来自己又写了个php页面打印结果是一个空数组
...ta)) { foreach ($data as $key => $value) { $data[$key] = self::convert($value, $to, $from); } return $data; } // string contain 8bit characters if (is_string($data) && preg_match('/[\x81-\xfe]/', $data)) { // mbstring, iconv, throw ... if (funct...
...setScheme(XSFieldScheme::logger()); try { $result = $this->setDb(self::LOG_DB)->setFuzzy()->setLimit($limit + 1)->search($query); foreach ($result as $doc) /* @var $doc XSDocument */ { $doc->setCharset($this->_charset); $body = $doc->body; if (!strca...
...ocal file for writing: `' . $conn . '\''); } $this->_flag |= self::FILE; $this->_sock = $sock; return; } elseif (($pos = strpos($conn, ':')) !== false) { $host = substr($conn, 0, $pos); $port = intval(substr($conn, $pos + 1)); } else { $host = '...
1. 相关ini配置: [goods_id] type = id index = self [goods_name] type = title index = both [goods_sn] index = both tokenizer = full 2. 导入相关数据 require_once '/usr/local/xunsearch/sdk/php/lib/XS.php'; $xs = new XS('goods'); $data = array( 'goods_id' => 112, ...
...该字段的索引方式(即配置文件中 `index` 选项的值)为 `self` 或 `both`,那么也可以根据该字段上的**索引词**进行删除。 特别注意是根据**索引词**删除而不是该字段的值,索引词是指该字段值经过分词器处理后得到的词汇。 对...
...ld->name; } $field->vno = ($field->type == XSFieldMeta::TYPE_BODY) ? self::MIXED_VNO : count($this->_vnoMap); $this->_vnoMap[$field->vno] = $field->name; // save field, ensure ID is the first field if ($field->type == XSFieldMeta::TYPE_ID) { $this->_fields = array_merge(array($...
...ull [subject] type = title [message] type = body [url] index = self tokenizer = full [chrono] type = numeric
...用自定义分词,用","分隔这样设置字段: [cat_id] index = self tokenizer = split(,) 然后使用字段索引搜索就可以解决问题了; 不过有下面需求的时候我就不知道怎么解决了: 有一个图片表(images),它有不同分辨率的图片,放在另外一...
... [ID] // 文章ID type = id phrase = yes [author] //作者 index = self [post_content] //内容 type = body [post_content_full] //全部内容 cutlen = 300 //显示300个字节 [post_title] //标题 type = title [post_time] //时间YYYYmmdd形式 type = date [post_date...