anchor.diff:          String indexName = indexLocation;       //local copy of the configuration variable
           IndexSearcher searcher = null;          //the searcher used to open/search the index
           Query query = null;                     //the Query created by the QueryParser
  -        Hits hits = null;                       //the search results
  +        TopDocs hits = null;                       //the search results
           int startindex = 0;                     //the first index displayed on this page
           int maxpage    = 50;                    //the maximum items displayed on this page
           String queryString = null;              //the query entered in the previous page
           String startVal    = null;              //string version of startindex
           String maxresults  = null;              //string version of maxpage
           int thispage = 0;                       //used for the for/next either maxpage or
  -                                                //hits.length() - startindex - whichever is
  +                                                //hits.totalHits - startindex - whichever is
                                                   //less
   
           try {
  -          searcher = new IndexSearcher(indexName);      //create an indexSearcher for our page
  +          IndexReader reader = IndexReader.open(FSDirectory.open(new File(indexName)), true); // only searching, so read-only=true
  +          searcher = new IndexSearcher(reader);         //create an indexSearcher for our page
                                                           //NOTE: this operation is slow for large
                                                           //indices (much slower than the search itself)
                                                           //so you might want to keep an IndexSearcher 
  
positive.code:                                                                       // searcher != null was to handle
                                                                        // a weird compilation bug 
                  thispage = maxpage;                                   // default last element to maxpage
                  hits = searcher.search(query);                        // run the query 
                  if (hits.length() == 0) {                             // if we got no results tell the user
  %>
                  <p> I'm sorry I couldn't find what you were looking for. </p>
  <%
  
negative.code: <%
                  }
  %>
  <%                if ( (startindex + maxpage) < hits.totalHits) {   //if there are more results...display 
                                                                     //the more link
  
                          String moreurl="results.jsp?query=" + 
  