mirror of https://github.com/apache/lucene.git
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:
parent
eb5344256f
commit
229e6e039f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue