💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[Xunsearch PHP-SDK](http://www.xunsearch.com) v1.4.8 权威指南 # XSSearch 搜索对象 通过 [XSSearch](#) 对象实现各种搜索相关操作。实现使用过程中并不需要自行创建该对象,而是直接访问 [XS::search](#) 即可。 ~~~ require '$prefix/sdk/php/lib/XS.php'; $xs = new XS('demo'); $search = $xs->search; // 搜索对象来自 XS 的属性 ~~~ 默认情况,搜索对象操作时对于用户输入的参数、搜索结果的输出编码视为默认编码,即 [XS::defaultCharset](#)。如果您需要指定不同编码,请调用 [XSSearch::setCharset](#) 进行设置。 ~~~ $search->setCharset('gbk'); ~~~ 关于搜索对象的详细用法剖析请阅读后面的专题。 $Id$ [« XSIndex 索引管理](#) [XSTokenizer 分词接口 »](#) Copyright © 2008-2011 by [杭州云圣网络科技有限公司](http://www.xunsearch.com) All Rights Reserved. ![](https://box.kancloud.cn/2015-09-10_55f11d024c618.gif) ![](https://box.kancloud.cn/2015-09-10_55f11d025c88e.gif) ![](https://box.kancloud.cn/2015-09-10_55f11d026697b.gif)