Authored by WN\wangnan

【图片搜索】fix

... ... @@ -125,19 +125,13 @@ public class SknImageVectorsServiceImpl implements ISknImageVectorsService, Appl
searchParam.setQuery(functionScoreQueryBuilder);
// 3.走本地缓存
SearchResult searchResult = new SearchResult();
final String indexName = ISearchConstants.INDEX_NAME_IMAGE_VECTORS;
// JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(searchCache, indexName, searchParam);
// if (cacheObject != null) {
// SearchCacheMatchLogger.doSearchCacheMatchLog("/searchSknByPhoto.json", paramMap);
// searchResult = (SearchResult)cacheObject.get("SearchResult");
// } else {
//4.根据特征,查询SknImageVectors索引
searchResult = searchCommonService.doSearch(indexName, searchParam);
SearchResult searchResult = searchCommonService.doSearch(indexName, searchParam);
JSONObject dataMap = new JSONObject();
dataMap.put("SearchResult", searchResult);
searchCacheService.addJSONObjectToCache(searchCache, indexName, searchParam, dataMap);
//}
SearchApiResult searchApiResult = new SearchApiResult();
if (CollectionUtils.isNotEmpty(searchResult.getResultList())) {
List<Map<String, Object>> sknList = getSknImageMap(searchResult.getResultList());
... ...