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
This commit is contained in:
Daniel Naber 2004-11-18 19:28:02 +00:00
parent eb5344256f
commit 229e6e039f
1 changed files with 6 additions and 2 deletions

View File

@ -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