Explorar o código

- 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 %!s(int64=4) %!d(string=hai) anos
pai
achega
e13b3d8302

+ 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;