lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sharad Agarwal <>
Subject IndexReader seems loading the full index
Date Tue, 16 May 2006 18:04:00 GMT
I am a newbie in lucene space. and trying to understand lucene search 
result caching; facing with a wierd issue.

After creating the IndexReader from a file system directory, I 
rename/remove the index directory; but still I am able to search the 
index and able to get the documents from Hits. This is making me beleive 
that there is some level of index loading in IndexReader itself. Does it 
load the full index or what all things it loads?

The code I am using is:

    reader ="/data/index");

//during the sleep time I just delete /data/index dir but still rest of 
the code works

    System.out.println("Sleeping after");
    indexSearcher = new IndexSearcher(reader);
   query = MultiFieldQueryParser.parse("yahoo", fields,  new 
   filter = new QueryFilter(query);
    Hits hits =, filter);
    for(int i=0;i<hits.length();i++){
        System.out.println(i +":     "+ hits.doc(i));


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message