I have written a timed program that a certain time selects all recently added records from the Database and then attempts to build indexes from this records which would be added to the existing Lucene records.
Code:
Session session = super.getSession();
FullTextSession fullTextSession = Search.createFullTextSession(session);
List<JobDescription> jobDescriptions = jobDescriptionDAO
.findByDate(searchEngineDAO.findMaxDate());
for (JobDescription jobDescription : jobDescriptions) {
fullTextSession.index(jobDescription);//Build Indexes and Add
}
}
Problem is it only works the first time I add a record, That is the first time it runs it builts index and places it in the directory ,
the second time it does'nt build the index unless i manually delete the existing Index files in the Lucene Directory, any help would be appreciated
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3
Name and version of the database you are using:MySQL
[/quote]