Newly indexed documents not showing up when searched for
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   David_Parish
Posted On:   Friday, January 21, 2005 08:40 AM

I have a nightly process that updates my indexes with new documents. What I am finding is that I can't find the documents via a search until I stop and start my servlet engine.


I hold my IndexSearcher objects staticly:

			
private static IndexSearcher issueSearcher = null;

// in constructor
if (issueSearcher == null) {
issueSearcher = new IndexSearcher (INDEX_DIR);
}



Could this be my problem? Do I have to recreate the IndexSearcher object when the contents of the index changes?

Re: Newly indexed documents not showing up when searched for

Posted By:   Otis_Gospodnetic  
Posted On:   Saturday, January 22, 2005 11:25 AM

Yes, when you detect the index has changed (using a method in IndexReader that gives you the index version), just open a new IndexSearcher.
About | Sitemap | Contact