static optimizeESIndex (req, res) {
    try {
      Db.optimizeIndex([req.params.index], { cluster: req.query.cluster });
    } catch (err) {
      console.log(`ERROR - ${req.method} /api/esindices/%s/optimize`, ArkimeUtil.sanitizeStr(req.params.index), util.inspect(err, false, 50));
    }

    // always return successfully right away, optimizeIndex might block
    return res.send(JSON.stringify({ success: true }));
  }
POST - /api/esindices/:index/optimize

Optimizes an OpenSearch/Elasticsearch index (admin only).
@name /esindices/:index/optimize
@returns {boolean} success - Always true, the optimizeIndex function might block. Check the logs for errors.