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, ...
...f ($this->type == self::TYPE_ID) { $this->flag = self::FLAG_INDEX_SELF; $this->tokenizer = 'full'; } elseif ($this->type == self::TYPE_TITLE) { $this->flag = self::FLAG_INDEX_BOTH | self::FLAG_WITH_POSITION; $this->weight = 5; ...
project.name = product_search2 server.index = 192.168.1.222:8383 server.search = 192.168.1.222:8384 [sales_id] type = id index = both [title] type = title 这是索引文件。
project.name = demo2 project.default_charset = utf8 server.index = 8383 server.search = 8384 [pid] type = id [subject] index = both tokenizer =xlen(2) 二元分词只能对英文生效,对中文不生效 同时急于需要一元分词,主要是做黑词筛选用,因为有...
字段设计有点问题。当type为string,没有指明index索引方式是是不分词的。 [title] type=string index=both 和 [title] type=title 这两个字段设计效果一样。同样content,类型也有问题,可以这样 [content] type=body 或者 [content] type=string index=mixed 具...
...件如下 project.name = entry project.default_charset = UTF-8 server.index = 10.1.20.51:8383 server.search = 10.1.20.51:8384 [tblog_entry_id] type = id [content] type = string index = both [user_id] type = numeric index = self tokenizer = full [post_time] type = numeric in...
...() 判断当前字段是否采用自定义分词器 XSFieldMeta hasIndex() 判断当前字段是否需要索引 XSFieldMeta hasIndexMixed() 判断当前字段是否需要在混合区索引 XSFieldMeta hasIndexSelf() 判断当前字段是否需要在字段区索引 XSField...
... XSServer->__construct(8383, Object(XS)) #4 ../phplib/XS.php(222): XS->getIndex() #5 ../phputil/Indexer.php(121): XSComponent->__get('index') #6 {main} 连接局域网内其他主机mysql是出的错误 命令如下: util/Indexer.php -p discuz --source=mysql://aaa:bbb@192.168.0.1/bbs --sql...
... 主键是指项目中类型为 `id` 的字段,删除是调用的是 [XSIndex::del] 方法,传入参数必须是 要删除的文档的`主键值`,或一系列主键值组成的`数组`。 ~~~ [php] $index->del('123'); // 删除主键值为 123 的记录 $index->del(array('123', '789', '456'...
hasIndex() 方法 public bool hasIndex() {return} bool 若需要返回 true, 不需要则返回 false 源码: sdk/php/lib/XSFieldScheme.class.php#L376 (显示) public function hasIndex(){ return ($this->flag & self::FLAG_INDEX_BOTH) ? true : false;} 判断当前字段是...