function createFoundCard(rootDiv, foundItem) {
  const cardDiv = document.createElement('div');
  cardDiv.classList.add('mdl-card');
  cardDiv.classList.add('mdl-shadow--2dp');
  cardDiv.classList.add('search-result');

  const titleDiv = document.createElement('div');
  titleDiv.classList.add('mdl-card__title');
  titleDiv.textContent = foundItem.matchWord;
  cardDiv.appendChild(titleDiv);

  const imgDiv = document.createElement('img');
  imgDiv.classList.add('search-result-thumbnail');
  imgDiv.src = `file://${foundItem.filePath}`;
  cardDiv.appendChild(imgDiv);

  const pathDiv = document.createElement('div');
  pathDiv.classList.add('mdl-card--border');
  pathDiv.classList.add('search-result-file-path');
  pathDiv.textContent = limitStringToLength(foundItem.filePath);
  cardDiv.appendChild(pathDiv);

  const topKDiv = document.createElement('div');
  topKDiv.classList.add('mdl-card--border');
  topKDiv.classList.add('search-result-top-k');
  const ul = document.createElement('ul');
  for (const classNameAndProb of foundItem.topClasses) {
    const li = document.createElement('li');
    if (classNameAndProb.prob >= 0.001) {
      li.textContent =
          `${classNameAndProb.className}: ${classNameAndProb.prob.toFixed(3)}`;
      ul.appendChild(li);
    }
  }
  topKDiv.appendChild(ul);
  cardDiv.appendChild(topKDiv);

  rootDiv.insertBefore(cardDiv, rootDiv.firstChild);
  cardDiv.scrollIntoView();

  updateClearSearchResultsButtonStatus();
}
Create and material-design card for a search match and add
it to the root div for search results.