docs/custom_theme/js/base.js
function search (query) {
  if (!allowSearch) {
    console.error('Assets for search still loading');
    return;
  }

  var resultDocuments = [];
  var results = index.search(query + '~2'); // fuzzy
  for (var i=0; i < results.length; i++){
    var result = results[i];
    doc = documents[result.ref];
    doc.summary = doc.text.substring(0, 200);
    resultDocuments.push(doc);
  }
  return resultDocuments;
}
function search (query) {
  if (!allowSearch) {
    console.error('Assets for search still loading');
    return;
  }

  var resultDocuments = [];
  var results = index.search(query + '~2'); // fuzzy
  for (var i=0; i < results.length; i++){
    var result = results[i];
    doc = documents[result.ref];
    doc.summary = doc.text.substring(0, 200);
    resultDocuments.push(doc);
  }
  return resultDocuments;
}
function search ( query ) { if ( ! allowSearch ) { console . error ( 'Assets for search still loading' ) ; return ; } var resultDocuments = [ ] ; var results = index . search ( query + '~2' ) ; // fuzzy for ( var i = 0 ; i < results . length ; i ++ ) { var result = results [ i ] ; doc = documents [ result . ref ] ; doc . summary = doc . text . substring ( 0 , 200 ) ; resultDocuments . push ( doc ) ; } return resultDocuments ; }
enable fuzzy searching
enable fuzzy searching