Hi , I remarked that after closing an IndexSearcher, queries on this Seacher will still run. My question is : why not always closing an IndexSearcher ? In my case I need to close all indexsearchers when I want to rebuild the index.
Sample code ----------------------------------------------------- searcher = new IndexSearcher("c:\\tmp\\index"); searcher.close(); Query query = QueryParser.parse("toto","text",ana); Hits hits = searcher.search(query); System.out.println(hits.length()); for (int i=0;i<hits.length();i++) { Document d = hits.doc(i); System.out.println(d.get("text")); } System.out.println("fin"); ---------------------------------------------------