搜索

大约有 200 项符合查询结果, 库内数据总量为 3,513 项。 (搜索耗时:0.1949秒)

111.RE: 英文模糊搜索问题

发布时间:2013-07-31 15:07 t By homingway

...nction __construct($arg = null){ if ($arg !== null && $arg !== '') $this->length = $arg; } public function getTokens($value, XSDocument $doc=null){ $charset = is_object($doc) ? $doc->getCharset() : 'UTF-8'; $ret = array(); //如果词的总长度小于给定的长度,则直接...

112.分面功能的search()

发布时间:2012-01-11 09:01 t By ixulf

...search函数,在返回代码附近有: if ($query === '') { $this->_count = $tmp['count']; $this->logQuery(); } 的代码,在开启了分面功能时,$tmp对象在获取分面数据时被重置了,运行到上面的代码时,大家都没有出错?(php5.2.9)

113.XSIndex::del

... del($term, $field = null){ // get field $field = $field === null ? $this->xs->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->getDefaultChar...

114.XSDocument::offsetSet

...ublic function offsetSet($name, $value){ if (!is_null($name)) { $this->__set(strval($name), $value); }} ArrayAccess 接口, 设置字段值, 勿直接调用

115.XSTokenizerScws::setIgnore

...nizer.class.php#L256 (显示) public function setIgnore($yes = true){ $this->_setting['ignore'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_IGNORE, $yes === false ? 0 : 1); return $this;} 设置忽略标点符号

116.RE: PSCWS4使用问题

发布时间:2010-10-21 17:10 t By hnmazda

编码问题找到原因,我使用的是PHP5版本,默认执行了这个构造函数 function __construct() { $this->PSCWS4(); } 导致使用的仍是GBK编码,$cws->set_charset('utf8');一下就可以了。 期待帮忙答复一下第二个问题,谢谢老大。

117.XSTokenizerScws::setDuality

...izer.class.php#L316 (显示) public function setDuality($yes = true){ $this->_setting['duality'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_DUALITY, $yes === false ? 0 : 1); return $this;} 设置散字二元组合

118.自定义分词器

...($arg = null) { if ($arg !== null && $arg !== '') $this->delim = $arg; } public function getTokens($value, XSDocument $doc) { $ret = array(); if (!empty($value)) $ret = explode($this->delim, $value); return $ret; } } ~~~ ...

119.XSSearch::addQueryTerm

... 1){ $term = strtolower($term); $term = XS::convert($term, 'UTF-8', $this->_charset); $bscale = ($scale > 0 && $scale != 1) ? pack('n', intval($scale * 100)) : ''; $vno = $field === null ? XSFieldScheme::MIXED_VNO : $this->xs->getField($field, true)->vno; $cmd = new XSCommand(XS_CMD_Q...

120.XSSearch::setFuzzy

...earch.class.php#L84 (显示) public function setFuzzy($value = true){ $this->_defaultOp = $value === true ? XS_CMD_QUERY_OP_OR : XS_CMD_QUERY_OP_AND; return $this;} 开启模糊搜索 默认情况只返回包含所有搜索词的记录, 通过本方法可以获得更多搜索结果

  • 时间不限
  • 按相关性排序