I am facing issue in the index creation. Actually I am getting some data(around 50k or more than that) at the run time and uploading those into database one by one and also I am inserting the data with another thread into Lucene indexes.
While, uploading the data its taking around 4 seconds for 4 records for index creation. Accordingly if I am creating indexes for larger amount of records then it will take around more than an hour which is not acceptable from application point of view.
Please suggest a solution through which I can reduce the timings of index creation at run time !
You’ll have to give more details than this.
- What does the code inserting data looks like exactly?
- What is you model, and in particular are there
- When you say “uploading those into database one by one”, you’re not opening one transaction per entity, right? More like, one per batch of entities?