<commit_before>'use strict';

const helper = require('./helper');

// this function should include commands that create indexes (if any)
// for any collections that the service may be using

// it should always return a promise
module.exports = function() {

  // SAMPLE CODE
  return helper.getCollection('decks').then((decks) => {
    return decks.createIndexes([
      { key: {'revisions.contentItems.ref.id': 1} },
      { key: {'revisions.contentItems.ref.revision': 1} },
      { key: {'revisions.contentItems.kind': 1} },
    ]);
  });

};<commit_msg>Adding indexes on id and users_id for templates<commit_after>'use strict';

const helper = require('./helper');

// this function should include commands that create indexes (if any)
// for any collections that the service may be using

// it should always return a promise
module.exports = function() {


  return helper.getCollection('decks').then((templates) => {
    return templates.createIndexes([
      { key: {'_id': 1, 'user_id': 1} }
    ]);
  });

};
{'fraction_non_alphanumeric': 0.14622178606476938, 'fraction_numerical': 0.004906771344455349, 'mean_word_length': 3.6363636363636362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2540293', 'n_tokens_mistral': 306, 'n_tokens_neox': 287, 'n_words': 95}