diff --git a/index.html b/index.html
index 86d9d57..d0a521a 100644
--- a/index.html
+++ b/index.html
@@ -22,11 +22,14 @@
Type a word or phrase into the box, and see how much it shows up
- in the HathiTrust Research Center Solr instance by year.
+ in texts indexed by the HathiTrust Research Center Solr instance
+ by year. The code is all sitting in your browser, so view the
+ JavaScript and HTML
+ if you want to see what's going on.
-
diff --git a/js/hathitime.js b/js/hathitime.js
index a282750..2f583b0 100644
--- a/js/hathitime.js
+++ b/js/hathitime.js
@@ -12,9 +12,11 @@ function search() {
function printResults(response) {
var template = $("#result-template").html();
- for (var i=0; i < response.facet_counts.facet_fields.publishDate.length; i=i+2) {
- var year = response.facet_counts.facet_fields.publishDate[i];
- var count = response.facet_counts.facet_fields.publishDate[i+1];
+ var result = response.facet_counts.facet_fields.publishDate;
+ for (var i=0; i < result.length; i=i+2) {
+ var year = result[i];
+ var count = result[i+1];
+ if (year > 2012 || year <= 1000) continue;
$("#results").append(Mustache.render(template, {
year: year,
count: count