xunsearch使用namespace后bug修复

xunsearch在使用了namespace后会出现不能正常使用
错误例如以下:
Fatal error: Uncaught [vendorsxunsearchlibXSException] ../vendors/xunsearch/lib/XS.php(972): Undefined custom tokenizer `full' for field 

解决方法例如以下:
找到XS.php文件里的public function getCustomTokenizer()改动当中的class_exists函数调用等部分例如以下
if (!class_exists( __NAMESPACE__ . '\' . $name)) {

在$obj = $arg === null ?

new $name : new $name($arg);前加一行


$name = __NAMESPACE__ . '\' . $name;

至此问题解决

原文地址:https://www.cnblogs.com/cxchanpin/p/6791973.html