Package com.jadyer.lucene;
Import Java.io.File;
Import java.io.IOException;
Import Org.apache.lucene.analysis.standard.StandardAnalyzer;
Import org.apache.lucene.document.Document;
Import Org.apache.lucene.document.Field;
Import Org.apache.lucene.index.IndexReader;
Import Org.apache.lucene.index.IndexWriter;
Import Org.apache.lucene.index.IndexWriterConfig;
Import Org.apache.lucene.index.Term;
Import Org.apache.lucene.search.IndexSearcher;
Import Org.apache.lucene.search.NRTManager;
Import Org.apache.lucene.search.NRTManagerReopenThread;
Import Org.apache.lucene.search.Query;
Import Org.apache.lucene.search.ScoreDoc;
Import Org.apache.lucene.search.TermQuery;
Import Org.apache.lucene.search.TopDocs;
Import Org.apache.lucene.search.NRTManager.TrackingIndexWriter;
Import Org.apache.lucene.store.Directory;
Import Org.apache.lucene.store.FSDirectory;
Import org.apache.lucene.util.Version;
/** * "Lucene3.6.2 Introduction Series" 12th section _ near-real-time search* @see Real Time Search (near-real-time)----> update the index immediately (Indexwriter.commit ()) * @see near-Real-time search------------------> Data changes as long as the data changes
, the index is saved in memory, and then a commit action is executed at a unified time for all indexes in memory * @see in order to achieve near-real-time search, LUCENE3.0 provides a way to reopen, and later versions provide two thread-safe classes Nrtmanager and Searchermanager * @see but these thread-safe classes are a bit different in the Lucene3.5 and 3.6 versions, and note that * @create Aug 7, 2013 4:19:58 PM * @aut
Hor Xuan Yu