|
@@ -23,9 +23,6 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.time.temporal.ChronoUnit;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -950,11 +947,11 @@ public class SearchIndexServiceImpl implements SearchIndexService {
|
|
|
* @param invalidCount int
|
|
|
*/
|
|
|
private void batchDeleteArticleDoc(Integer invalidCount) {
|
|
|
- // 批量推送,每100条推送一次
|
|
|
- int loop = (int) Math.ceil(invalidCount.doubleValue() / 100);
|
|
|
+ // 批量推送,每50条推送一次
|
|
|
+ int loop = (int) Math.ceil(invalidCount.doubleValue() / 50);
|
|
|
// 定义返回结果
|
|
|
for (int i = 1; i <= loop; i++) {
|
|
|
- PageHelper.startPage(i, 100);
|
|
|
+ PageHelper.startPage(i, 50);
|
|
|
// 获取失效商品IDs
|
|
|
List<Integer> invalidIds = searchMapper.findArticleInvalidIds();
|
|
|
// 删除文档只需要设置需删除文档主键值即可
|