...his->execCommand(XS_CMD_FLUSH_LOGGING, XS_CMD_OK_LOG_FLUSHED); } catch (XSException $e) { if ($e->getCode() === XS_CMD_ERR_BUSY) { return false; } throw $e; } return true;} 强制刷新服务端当前项目的搜索日志
...$data) && ($data = file_get_contents($data)) === false) { throw new XSException('Failed to read exdata from file'); } // try to check allowed (BUG: check the first cmd only): // XS_CMD_IMPORT_HEADER, XS_CMD_INDEX_REQUEST, XS_CMD_INDEX_REMOVE, XS_CMD_INDEX_EXDATA $first = ord(subst...
...this->execCommand(XS_CMD_INDEX_COMMIT, XS_CMD_OK_DB_COMMITED); } catch (XSException $e) { if ($e->getCode() === XS_CMD_ERR_BUSY || $e->getCode() === XS_CMD_ERR_RUNNING) { return false; } throw $e; } return true;} 强制刷新服务端的当前库的索引...
...ion __set($name, $value){ if ($this->_meta !== null) { throw new XSException('Magick property of result document is read-only'); } $this->setField($name, $value);} 魔术方法 __set 实现以对象属性方式设置文档字段值
...ypeMap[XSFieldMeta::TYPE_ID])) { if ($throw) { throw new XSException('Missing field of type ID'); } return false; } return true;} 判断该字段方案是否有效、可用 每个方案必须并且只能包含一个类型为 ID 的字段
... => 2), XS_CMD_OK_DB_REBUILD); $this->_rebuild = false; } catch (XSException $e) { if ($e->getCode() !== XS_CMD_ERR_WRONGPLACE) { throw $e; } } return $this;} 中止索引重建 丢弃重建临时库的所有数据, 恢复成当前搜索库, 主要用于...
... if (($sock = @fopen($conn, 'wb')) === false) { throw new XSException('Failed to open local file for writing: `' . $conn . '\''); } $this->_flag |= self::FILE; $this->_sock = $sock; return; } elseif (($pos = strpos($conn, ':')) !== false) { $hos...
... $msg .= ' property: ' . get_class($this) . '::$' . $name; throw new XSException($msg);} 魔术方法 __get 取得模拟属性的值, 内部实际调用 getXxx 方法的返回值
... $msg .= ' property: ' . get_class($this) . '::$' . $name; throw new XSException($msg);} 魔术方法 __set 设置模拟属性的值, 内部实际是调用 setXxx 方法
...ame])) { return $this->_meta[$name]; } } throw new XSException('Call to undefined method `' . get_class($this) . '::' . $name . '()\'');} 魔术方法 __call 实现以函数调用访问搜索结果元数据, 支持: docid, rank, percent, weight, ccount