Просмотр исходного кода

- Investigated the search feature can only working while using old index
- Investigated indexing not working
- Compare @elastic/elasticsearch `index status` and `index meta` with elasticsearch.js
- Check and debug the client API result on elasticsearch.ts
- Research writing index data flow
- Bring back requestTimeout on client initiation
- Remove requestTimeout on bulkWrite index

LuqmanHakim-Grune 4 лет назад
Родитель
Сommit
e13b3d8302
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      packages/app/src/server/service/search-delegator/elasticsearch.ts

+ 2 - 2
packages/app/src/server/service/search-delegator/elasticsearch.ts

@@ -99,7 +99,7 @@ class ElasticsearchDelegator implements SearchDelegator<Data> {
       node: host,
       ssl: { rejectUnauthorized: false }, // TODO: set ssl from global env config
       auth: { username, password },
-      // requestTimeout: this.configManager.getConfig('crowi', 'app:elasticsearchRequestTimeout'),
+      requestTimeout: this.configManager.getConfig('crowi', 'app:elasticsearchRequestTimeout'),
       // log: 'debug',
     });
     this.indexName = indexName;
@@ -527,7 +527,7 @@ class ElasticsearchDelegator implements SearchDelegator<Data> {
         try {
           const res = await bulkWrite({
             body,
-            requestTimeout: Infinity,
+            // requestTimeout: Infinity,
           });
 
           count += (res.items || []).length;