...b/XSFieldScheme.class.php#L452 (显示) public function toConfig(){ // type $str = "[" . $this->name . "]\n"; if ($this->type === self::TYPE_NUMERIC) { $str .= "type = numeric\n"; } elseif ($this->type === self::TYPE_DATE) { $str .= "type = date\n"; } elseif ($this->typ...
...Scheme.class.php#L514 (显示) public function fromConfig($config){ // type & default setting if (isset($config['type'])) { $predef = 'self::TYPE_' . strtoupper($config['type']); if (defined($predef)) { $this->type = constant($predef); if ($this->type == se...
...范围:[0-9A-Za-z-_], 长度控制在 1~32 字节为宜 XSFieldMeta type int 字段类型 XSFieldMeta vno int 字段序号 取值为 0~255, 同一字段方案内不能重复, 由 XSFieldScheme::addField 进行确定 XSFieldMeta weight int 混合区检索时的相对权...
...= null) { $scheme = new self; $scheme->addField('id', array('type' => 'id')); $scheme->addField('pinyin'); $scheme->addField('partial'); $scheme->addField('total', array('type' => 'numeric', 'index' => 'self')); $scheme->addField('lastnum', array('type' => '...
...me.class.php#L367 (显示) public function isSpeical(){ return ($this->type == self::TYPE_ID || $this->type == self::TYPE_TITLE || $this->type == self::TYPE_BODY);} 判断当前字段是否为特殊类型 特殊类型的字段是指 id, title, body, 每个项目至多只能有一个这种类...
...>name . '\''); } if ($field->isSpeical()) { if (isset($this->_typeMap[$field->type])) { $prev = $this->_typeMap[$field->type]; throw new XSException('Duplicated ' . strtoupper($config['type']) . ' field: `' . $field->name . '\' and `' . $prev . '\''); } ...
...定义于 arg XSDataSource inCli XSDataSource type XSDataSource Public 方法 隐去继承来的方法 名称描述定义于 __construct() 构造函数 XSDataSource getCharset() 返回数据库输出字符集 XSDatabaseDataSour...
getHotQuery() 方法 public array getHotQuery(int $limit=6, string $type='total') $limit int 需要返回的热门搜索数量上限, 默认为 6, 最大值为 50 $type string 排序类型, 默认为 total(搜索总量), 可选值还有 lastnum(上周), currnum(本周) {re...
isNumeric() 方法 public bool isNumeric() {return} bool 是返回 true, 不是返回 false 源码: sdk/php/lib/XSFieldScheme.class.php#L357 (显示) public function isNumeric(){ return ($this->type == self::TYPE_NUMERIC);} 判断当前字段是否为数字型
...>name . '\''); } if ($field->isSpeical()) { if (isset($this->_typeMap[$field->type])) { $prev = $this->_typeMap[$field->type]; throw new XSException('Duplicated ' . strtoupper($config['type']) . ' field: `' . $field->name . '\' and `' . $prev . '\''); } ...