searchIndex(searchTerms, fileNames) {
    fileNames = fileNames || Object.keys(this.files);
    this.result = {};
    const allSearchTerms =
      InvertedIndexUtilities.getCleanTokens(searchTerms);
    fileNames.forEach((currentFile) => {
      allSearchTerms.forEach((term) => {
        if (Object.hasOwnProperty.call(this.indexTable[currentFile], term)) {
          if (currentFile in this.result) {
            this.result[currentFile][term] = this.indexTable[currentFile][term];
          } else {
            this.result[currentFile] = {};
            this.result[currentFile][term] = this.indexTable[currentFile][term];
          }
        }
      });
    });
    return Object.keys(this.result).length > 0 ? this.result : false;
  }
/**
   * searchIndex
   * Search for the occurrence of words in the indexTable
   * @param {String} searchTerms The search term(s)
   * @param {Object} fileNames An array of filenames to search
   * @returns {Object} A map of the search result
   */
searchIndex
Search for the occurrence of words in the indexTable
@param {String} searchTerms The search term(s)
@param {Object} fileNames An array of filenames to search
@returns {Object} A map of the search result
searchIndex Search for the occurrence of words in the indexTable @param { String } searchTerms The search term ( s ) @param { Object } fileNames An array of filenames to search @returns { Object } A map of the search result
searchIndex(searchTerms, fileNames) {
    fileNames = fileNames || Object.keys(this.files);
    this.result = {};
    const allSearchTerms =
      InvertedIndexUtilities.getCleanTokens(searchTerms);
    fileNames.forEach((currentFile) => {
      allSearchTerms.forEach((term) => {
        if (Object.hasOwnProperty.call(this.indexTable[currentFile], term)) {
          if (currentFile in this.result) {
            this.result[currentFile][term] = this.indexTable[currentFile][term];
          } else {
            this.result[currentFile] = {};
            this.result[currentFile][term] = this.indexTable[currentFile][term];
          }
        }
      });
    });
    return Object.keys(this.result).length > 0 ? this.result : false;
  }
searchIndex ( searchTerms , fileNames ) { fileNames = fileNames || Object . keys ( this . files ) ; this . result = { } ; const allSearchTerms = InvertedIndexUtilities . getCleanTokens ( searchTerms ) ; fileNames . forEach ( ( currentFile ) => { allSearchTerms . forEach ( ( term ) => { if ( Object . hasOwnProperty . call ( this . indexTable [ currentFile ] , term ) ) { if ( currentFile in this . result ) { this . result [ currentFile ] [ term ] = this . indexTable [ currentFile ] [ term ] ; } else { this . result [ currentFile ] = { } ; this . result [ currentFile ] [ term ] = this . indexTable [ currentFile ] [ term ] ; } } } ) ; } ) ; return Object . keys ( this . result ) . length > 0 ? this . result : false ; }
searchIndex
 Search for the occurrence of words in the indexTable
 @param {String} searchTerms The search term(s)
 @param {Object} fileNames An array of filenames to search
 @returns {Object} A map of the search result
searchIndex Search for the occurrence of words in the indexTable @param { String } searchTerms The search term ( s ) @param { Object } fileNames An array of filenames to search @returns { Object } A map of the search result