瀏覽代碼

Avoid timeout when rebuilding index

Sotaro KARASAWA 9 年之前
父節點
當前提交
2a046655fd
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      lib/util/search.js

+ 4 - 1
lib/util/search.js

@@ -226,7 +226,10 @@ SearchClient.prototype.addAllPages = function()
       // all done
 
       // 最後に送信
-      self.client.bulk({ body: body, })
+      self.client.bulk({
+        body: body,
+        requestTimeout: Infinity,
+      })
       .then(function(res) {
         debug('Reponse from es:', res);
         return resolve(res);