I wrote a small loop which added 10,000 documents into the IndexWriter and it took for ever to do it.
Is there another way to index large volumes of documents?
I ask because when this goes live it has to load in 15,000 records.
The other question is how do I prevent having to load in all the records again when the web application is restarted?
Edit
Here is the code i used;
for (int t = 0; t < 10000; t++){
doc = new Document();
text = "Value" + t.toString();
doc.Add(new Field("Value", text, Field.Store.YES, Field.Index.TOKENIZED));
iwriter.AddDocument(doc);
};
Edit 2
Analyzer analyzer = new StandardAnalyzer();
Directory directory = new RAMDirectory();
IndexWriter iwriter = new IndexWriter(directory, analyzer, true);
iwriter.SetMaxFieldLength(25000);
then the code to add the documents, then;
iwriter.Close();