/*
* @see java.lang.Runnable#run()
*/
@Override
public void run() {
SearchService searchService = new SearchServiceImpl();
searchService.setStoreName(this.indexStoreName);
// 索引MAP数据结构
if(null != indexDataList && !indexDataList.isEmpty()){
// 调用搜索引擎接口
boolean isSuccess = searchService.saveOrUpdate(indexDataList);
if(isSuccess){
// 更新已索引资源状态
IndexTasksRequest taskRequest = new IndexTasksRequest();
taskRequest.updateIndexedStatus(indexDataList);
}
}
// 索引bean数据结构
if(null != indexBeanList && !indexBeanList.isEmpty()){
// 调用搜索引擎接口
boolean isSuccess = searchService.saveOrUpdateBeans(indexBeanList);
if(isSuccess){
// 更新已索引资源状态
IndexTasksRequest taskRequest = new IndexTasksRequest();
taskRequest.updateBeansIndexedStatus(indexBeanList);
}