Showing
1 changed file
with
6 additions
and
12 deletions
@@ -125,19 +125,13 @@ public class SknImageVectorsServiceImpl implements ISknImageVectorsService, Appl | @@ -125,19 +125,13 @@ public class SknImageVectorsServiceImpl implements ISknImageVectorsService, Appl | ||
125 | searchParam.setQuery(functionScoreQueryBuilder); | 125 | searchParam.setQuery(functionScoreQueryBuilder); |
126 | 126 | ||
127 | // 3.走本地缓存 | 127 | // 3.走本地缓存 |
128 | - SearchResult searchResult = new SearchResult(); | ||
129 | final String indexName = ISearchConstants.INDEX_NAME_IMAGE_VECTORS; | 128 | final String indexName = ISearchConstants.INDEX_NAME_IMAGE_VECTORS; |
130 | - // JSONObject cacheObject = searchCacheService.getJSONObjectFromCache(searchCache, indexName, searchParam); | ||
131 | -// if (cacheObject != null) { | ||
132 | -// SearchCacheMatchLogger.doSearchCacheMatchLog("/searchSknByPhoto.json", paramMap); | ||
133 | -// searchResult = (SearchResult)cacheObject.get("SearchResult"); | ||
134 | -// } else { | ||
135 | - //4.根据特征,查询SknImageVectors索引 | ||
136 | - searchResult = searchCommonService.doSearch(indexName, searchParam); | ||
137 | - JSONObject dataMap = new JSONObject(); | ||
138 | - dataMap.put("SearchResult", searchResult); | ||
139 | - searchCacheService.addJSONObjectToCache(searchCache, indexName, searchParam, dataMap); | ||
140 | - //} | 129 | + |
130 | + //4.根据特征,查询SknImageVectors索引 | ||
131 | + SearchResult searchResult = searchCommonService.doSearch(indexName, searchParam); | ||
132 | + JSONObject dataMap = new JSONObject(); | ||
133 | + dataMap.put("SearchResult", searchResult); | ||
134 | + searchCacheService.addJSONObjectToCache(searchCache, indexName, searchParam, dataMap); | ||
141 | SearchApiResult searchApiResult = new SearchApiResult(); | 135 | SearchApiResult searchApiResult = new SearchApiResult(); |
142 | if (CollectionUtils.isNotEmpty(searchResult.getResultList())) { | 136 | if (CollectionUtils.isNotEmpty(searchResult.getResultList())) { |
143 | List<Map<String, Object>> sknList = getSknImageMap(searchResult.getResultList()); | 137 | List<Map<String, Object>> sknList = getSknImageMap(searchResult.getResultList()); |
-
Please register or login to post a comment