...
|
...
|
@@ -9,8 +9,8 @@ import com.yoho.search.base.utils.ISearchConstants; |
|
|
import com.yoho.search.base.utils.MD5Util;
|
|
|
import com.yoho.search.consumer.index.common.IYohoIndexService;
|
|
|
import com.yoho.search.consumer.index.rebuild.RebuildFlagService;
|
|
|
import com.yoho.search.consumer.job.ProductVectorFeatureJob;
|
|
|
import com.yoho.search.consumer.job.IndexRebuildJob;
|
|
|
import com.yoho.search.consumer.job.ProductVectorFeatureJob;
|
|
|
import com.yoho.search.consumer.job.SuggestionJob;
|
|
|
import com.yoho.search.consumer.service.base.ProductIndexService;
|
|
|
import com.yoho.search.consumer.service.base.SuggestWordDefService;
|
...
|
...
|
@@ -351,9 +351,13 @@ public class IndexController implements ApplicationEventPublisherAware { |
|
|
|
|
|
@RequestMapping(value = "/index/updateProductIndexVector")
|
|
|
@ResponseBody
|
|
|
public Map<String, Object> updateProductIndexVector() {
|
|
|
public Map<String, Object> updateProductIndexVector(@RequestParam(defaultValue = "false") boolean force) {
|
|
|
try {
|
|
|
productVectorFeatureJob.updateProductIndexVector();
|
|
|
if (force) {
|
|
|
productVectorFeatureJob.doUpdateProductIndexVector();
|
|
|
} else {
|
|
|
productVectorFeatureJob.updateProductIndexVector();
|
|
|
}
|
|
|
return getResultMap(200, "success");
|
|
|
} catch (Exception e) {
|
|
|
logger.error(e.getMessage(), e);
|
...
|
...
|
|