Package org.zvec.binding
Class ConfigData
java.lang.Object
org.zvec.binding.ConfigData
- All Implemented Interfaces:
AutoCloseable
High-level wrapper for
zvec_config_data_t.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voiddestroy()floatfloatGet the jieba dictionary directory; empty string when not set.intlongintintvoidsetBruteForceByKeysRatio(float ratio) voidsetConsoleLog(LogLevel level) Convenience: set up console logging in one call.voidsetFileLog(LogLevel level, String dir, String basename, int fileSizeMB, int overdueDays) Convenience: set up file logging in one call.voidsetInvertToForwardScanRatio(float ratio) voidsetJiebaDictDir(String dir) Set the jieba dictionary directory used by thejiebaFTS tokenizer (directory containingjieba.dict.utf8andhmm_model.utf8).voidsetLogConfig(LogConfig logConfig) Set log configuration.voidsetMemoryLimit(long bytes) voidsetOptimizeThreadCount(int count) voidsetQueryThreadCount(int count)
-
Constructor Details
-
ConfigData
public ConfigData()
-
-
Method Details
-
setMemoryLimit
public void setMemoryLimit(long bytes) -
getMemoryLimit
public long getMemoryLimit() -
setJiebaDictDir
Set the jieba dictionary directory used by thejiebaFTS tokenizer (directory containingjieba.dict.utf8andhmm_model.utf8). Applied atZvec.initialize(org.zvec.binding.ConfigData)time as the process-wide default. Resolution priority at tokenization time: per-fieldextra_params.jieba_dict_dir> theZVEC_JIEBA_DICT_DIRenvironment variable > this default. -
getJiebaDictDir
Get the jieba dictionary directory; empty string when not set. -
setLogConfig
Set log configuration. Ownership is transferred to this ConfigData; do not destroy the LogConfig separately afterward. -
getLogType
public int getLogType() -
setConsoleLog
Convenience: set up console logging in one call. -
setFileLog
public void setFileLog(LogLevel level, String dir, String basename, int fileSizeMB, int overdueDays) Convenience: set up file logging in one call. -
setQueryThreadCount
public void setQueryThreadCount(int count) -
getQueryThreadCount
public int getQueryThreadCount() -
setInvertToForwardScanRatio
public void setInvertToForwardScanRatio(float ratio) -
getInvertToForwardScanRatio
public float getInvertToForwardScanRatio() -
setBruteForceByKeysRatio
public void setBruteForceByKeysRatio(float ratio) -
getBruteForceByKeysRatio
public float getBruteForceByKeysRatio() -
setOptimizeThreadCount
public void setOptimizeThreadCount(int count) -
getOptimizeThreadCount
public int getOptimizeThreadCount() -
destroy
public void destroy() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-