ntry.key.length);

  return relevance;
}

Search.prototype.search = function (searchString) {
  if (searchString === '') {
    this.displayResults([]);
    this.hideSearch();
    return;
  } else {
    this.showSearch();
  }

  if (searchString.length === 1) {
    this.displayResults([]);
    return;
  }

  var results;

  if (/^[\d\.]*$/.test(searchString)) {
    results = this.biblio.clauses.filter(function (clause) {
      return clause.number.substring(0, searchString.length) === searchString;
    }).ma