index
  const index = new Document({
    document: {
      id: "tconst",
      store: true,
      index: [{
        field: "primaryTitle",
        tokenize: "forward",
        encoder: Charset.LatinBalance
      },{
        field: "originalTitle",
        tokenize: "forward",
        encoder: Charset.LatinBalance
      }],
      tag: [{
        field: "startYear"
      },{
        field: "genres"
      }]
    }
  });

  // add test data
  for(let i = 0; i < data.length; i++){
    index.add(data[i]);
  }

  