public class SouwenClient extends Base
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
Api_Version |
static int |
FEED_BUf_MAX_LEN |
private ConnPool<IndexConn> |
iconn_pool |
static int |
Once_Feed_Max_Table |
static boolean |
open_on_create |
private ConnPool<QueryConn> |
qconn_pool |
static int |
souwen_Version_Support |
| 限定符 | 构造器和说明 |
|---|---|
protected |
SouwenClient() |
|
SouwenClient(SouwenConfig cfg)
构造方法
|
getCfg, getCharset, getFieldEnumId, getFieldEnumName, getSchema, getSpecialIdxParser, setSpecialIdxParserpublic static boolean open_on_create
public static final int souwen_Version_Support
public static final int Once_Feed_Max_Table
public static int FEED_BUf_MAX_LEN
public SouwenClient(SouwenConfig cfg) throws Exception
cfg - -- 配置信息SysConnectionExceptionExceptionprotected SouwenClient()
protected void init_ConnPool(SouwenConfig cfg) throws Exception
Exceptionprotected void open()
throws Exception
SysConnectionException - -- 当网络不通时会抛出该异常Exceptionpublic void testServerConnection(BaseConn conn) throws Exception
testServerConnection 在类中 BaseExceptionpublic ServerIdxThreadStates queryServerAddState() throws Exception
Exceptionpublic ServerIdxThreadStates queryServerAddState(QueryConn conn) throws Exception
Exceptionpublic void createDb(Schema schema) throws Exception
schema - -- 要创建的全文库的结构Exceptionprivate void checkNewSchema(Schema schema) throws Exception
schema - Exceptionpublic void addDoc(List<? extends Doc> docs) throws Exception
docs - -- 要加载的文章的集合Exceptionpublic QueryResponse query(QueryRequest request) throws Exception
如果只是要统计能够检索到多少条记录。请使用SearchSystem.count(request)
request - -- 检索的条件Exceptionpublic QueryResponse query(QueryConn conn, QueryRequest request) throws Exception
Exceptionpublic long count(QueryRequest request) throws Exception
只返回统计结果的条数。内容不返回。如果需要检索内容,使用SearchSystem.query(request)
request - -- 条件Exceptionpublic long count(QueryConn conn, QueryRequest request) throws Exception
Exceptionpublic int delDoc(QueryRequest request) throws Exception
request - -- 要删除的条件Exceptionpublic int delDoc(QueryConn conn, QueryRequest request) throws Exception
Exceptionpublic void commit()
throws Exception
服务器端有缓存机制,加载的数据会先保存在服务器的缓存的中,直到缓存满了,服务器会自动地提交内存的数据到全文库。调用这个方法,如果服务器缓存中有数据,它会强制提交内存的数据到全文库,而不管缓存是否满了。
Exceptionpublic void destroy()
public UpdateResponse update(UpdateRequest req, Doc doc) throws Exception
Exceptionpublic UpdateResponse update(QueryConn conn, UpdateRequest request, Doc doc) throws Exception
Exceptionpublic UpdateResponse update(long seq_value_of_doc, Doc doc) throws Exception
Exceptionpublic UpdateResponse update(QueryConn conn, long seq_value_of_doc, Doc doc) throws Exception
Exceptionpublic ExamineResponse examine(QueryRequest request) throws Exception
Exceptionpublic ExamineResponse examine(QueryConn conn, QueryRequest request) throws Exception
ExceptionCopyright © 2023. All rights reserved.