nodebb-plugin-dbsearch 6.2.16 → 6.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/mongo.js CHANGED
@@ -12,9 +12,9 @@ exports.createIndices = async function (language) {
12
12
 
13
13
  if (nconf.get('isPrimary') && !nconf.get('jobsDisabled')) {
14
14
  await db.client.collection('searchtopic').createIndex({ content: 'text', uid: 1, cid: 1 }, options);
15
- await db.client.collection('searchtopic').createIndex({ ts: 1 }, options);
15
+ await db.client.collection('searchtopic').createIndex({ ts: 1 }, { background: true });
16
16
  await db.client.collection('searchpost').createIndex({ content: 'text', uid: 1, cid: 1 }, options);
17
- await db.client.collection('searchpost').createIndex({ ts: 1 }, options);
17
+ await db.client.collection('searchpost').createIndex({ ts: 1 }, { background: true });
18
18
  await db.client.collection('searchchat').createIndex({ content: 'text', roomId: 1, uid: 1 }, options);
19
19
  }
20
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-dbsearch",
3
- "version": "6.2.16",
3
+ "version": "6.2.18",
4
4
  "description": "A Plugin that lets users search posts and topics",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -27,10 +27,10 @@ module.exports = {
27
27
  _id: doc._id.toString(),
28
28
  }));
29
29
  await bulk.execute();
30
+ progress.incr(docs.length);
30
31
  }, {
31
32
  batch: 500,
32
33
  });
33
- progress.incr(docs.length);
34
34
  }
35
35
 
36
36
  if (mainDB === 'mongo') {