I have indexed from filesystem and database. It was huge data and almost takes 6 hr to complete the index.
Now I want to index on the fly the new added files in database and filesytstem. Can anyone point me to any example.
Is there way to update document?
will the below line only add new docs or even update the exiting one. Does it take same time to indexx it??
writer = new IndexWriter(dir, new StandardAnalyzer(), false, IndexWriter.MaxFieldLength.LIMITED);
Are you asking if it is possible to update an index with newly added data without have to reindex everything that is in the index already? If so, then yes - that is possible.
The indexing code might be in a method that takes the IndexWriter and the File object as parameter - that way it needn't be concerned with whether the index is old or new, and can be called both from the code that creates a completely new index, and code that updates the index with recent data.
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad: