From 229e6e039f2f94784977b89ee29908e382dd8a39 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Thu, 18 Nov 2004 19:28:02 +0000 Subject: [PATCH] adding a comment that opening an IndexReader can be slow git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150650 13f79535-47bb-0310-9956-ffa450edef68 --- src/jsp/results.jsp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jsp/results.jsp b/src/jsp/results.jsp index e53e3237f01..b5510cd228c 100755 --- a/src/jsp/results.jsp +++ b/src/jsp/results.jsp @@ -43,8 +43,12 @@ public String escapeHTML(String s) { try { searcher = new IndexSearcher( - IndexReader.open(indexName) //create an indexSearcher for our page - ); + IndexReader.open(indexName)); //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 + //open + } catch (Exception e) { //any error that happens is probably due //to a permission problem or non-existant //or otherwise corrupt index