...示) public function getResult($text){ $words = array(); $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_RESULT, 0, $text); $res = self::$_server->execCommand($cmd, XS_CMD_OK_SCWS_RESULT); while ($res->buf !== '') { $tmp = unpac...
...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(); //如果词的总长度小于给定的长度,则直接...
...tion setMulti($mode = 3){ $mode = intval($mode) & self::MULTI_MASK; $this->_setting['multi'] = new XSCommand(XS_CMD_SEARCH_SCWS_SET, XS_CMD_SCWS_SET_MULTI, $mode); return $this;} 设置复合分词选项
...ueryString($query, $addOp = XS_CMD_QUERY_OP_AND, $scale = 1){ $query = $this->preQueryString($query); $bscale = ($scale > 0 && $scale != 1) ? pack('n', intval($scale * 100)) : ''; $cmd = new XSCommand(XS_CMD_QUERY_PARSE, $addOp, $this->_defaultOp, $query, $bscale); $this->execCommand($cm...
...getTops($text, $limit = 10, $xattr = ''){ $words = array(); $text = $this->applySetting($text); $cmd = new XSCommand(XS_CMD_SEARCH_SCWS_GET, XS_CMD_SCWS_GET_TOPS, $limit, $text, $xattr); $res = self::$_server->execCommand($cmd, XS_CMD_OK_SCWS_TOPS); while ($res->buf !== '') { $...
修改XS.php文件 第1558行 [php]$this->logQuery();[/php] 改为: [php]if($ret&&!stripos(str_ireplace(array('spider','bot','slurp'),'fuck123',$_SERVER['HTTP_USER_AGENT']),'fuck123')) $this->logQuery();[/php]
getAllFields() 方法 public XSFieldMeta[] getAllFields() {return} XSFieldMeta[] 源码: sdk/php/lib/XS.class.php#L523 (显示) public function getAllFields(){ return $this->_scheme->getAllFields();} 获取项目所有字段结构设置
getConfig() 方法 public array getConfig() {return} array 获取配置原始数据 源码: sdk/php/lib/XS.class.php#L359 (显示) public function getConfig(){ return $this->_config;}
getFieldBody() 方法 public XSFieldMeta getFieldBody() {return} XSFieldMeta 类型为 BODY 的字段 源码: sdk/php/lib/XS.class.php#L501 (显示) public function getFieldBody(){ return $this->_scheme->getFieldBody();} 获取当前内容字段
getFieldId() 方法 public XSFieldMeta getFieldId() {return} XSFieldMeta 类型为 ID 的字段 源码: sdk/php/lib/XS.class.php#L481 (显示) public function getFieldId(){ return $this->_scheme->getFieldId();} 获取当前主键字段