package com.walker.support.es; import java.util.List; /** * 描述:全文检索服务接口规范定义 * @author 时克英 * @date 2020年7月4日 上午11:11:21 */ @Deprecated public interface SearchService { Object createAttachmentProcessor(String description); /** * 创建一个索引(库),如果已存在则返回false * @param name 索引名字 * @param type 类型,为空则系统默认为值:table。【该字段废弃】 * @return */ boolean createIndex(String name, String type, String json); boolean existIndex(String name, String type) throws Exception; String search(String index, String queryText, int dataSecurity, String securityInfo, int pageIndex, int pageSize) throws Exception; String searchDataById(String index, String _id) throws Exception; /** * 只加载一个文件数据 * @param index * @param _id * @return * @throws Exception */ @Deprecated String searchFileById(String index, String _id) throws Exception; /** * 查询最近搜索关联集合 * @param index * @param keyWord * @return * @throws Exception */ List searchRecent(String index, String keyWord) throws Exception; void putContent(String index, List datas) throws Exception; void removeIndex(String index) throws Exception; List getKeyWordList(String index, String _id, String field) throws Exception; /** * 设置分词方式:ik_max_word | ik_smart,默认ik_max_word

*
	 * 1. Constants.TOKEN_TYPE_MAX
	 * 2. Constants.TOKEN_TYPE_SMART
	 * 
* @param tokenType */ void setTokenType(String tokenType); /** * 自动检测附件pipeline,如果不存在则创建,一般名字定义为:attachment * @param pipeline * @return * @throws Exception * @author 时克英 * @date 2020-08-25 */ boolean autoCreatePipelineAttachment(String pipeline) throws Exception; }