How to use SolrNet to import database tables from Sql server 2008 r2

379 views
Skip to first unread message

hemant172

unread,
May 5, 2011, 5:02:49 AM5/5/11
to SolrNet
Kindly tell me how to use C# code to import database tables from Sql
server 2008 r2.

Mauricio Scheffer

unread,
May 5, 2011, 9:04:05 AM5/5/11
to sol...@googlegroups.com
See http://groups.google.com/group/solrnet/browse_thread/thread/5f2c8fbf2e6832e4

--
Mauricio



On Thu, May 5, 2011 at 6:02 AM, hemant172 <hemant...@gmail.com> wrote:
Kindly tell me how to use C# code to import database tables from Sql
server 2008 r2.

--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To post to this group, send email to sol...@googlegroups.com.
To unsubscribe from this group, send email to solrnet+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/solrnet?hl=en.


Thalai Selvam

unread,
May 5, 2011, 9:31:35 AM5/5/11
to sol...@googlegroups.com
Iam tried the same way, its working fine. but the performance is low ( it take 1 hour to index 5 lakh records), could you help me to improve the performance? or do we need to make any setting solrconfig.xml?

Regards,
Thalaiselvam N  

Mauricio Scheffer

unread,
May 5, 2011, 9:39:42 AM5/5/11
to sol...@googlegroups.com
What does "lakh" mean?
Batch up your documents, i.e. instead of doing an Add() per document, Add() 200 documents at once.

--
Mauricio

Thalai Selvam

unread,
May 5, 2011, 9:46:18 AM5/5/11
to sol...@googlegroups.com
"Lakh" means 0.5 million, and iam doing batch update only... i had set the batch count is 15000, i have to index 15 million per day.

- Thalaiselvam N

Mauricio Scheffer

unread,
May 5, 2011, 9:54:18 AM5/5/11
to sol...@googlegroups.com
15000 docs looks like a pretty big batch size. Try playing with that value, start at 500, and find the optimum value for your case. 
I wrote an article some time ago with some tips about this: http://bugsquash.blogspot.com/2010/02/indexing-millions-of-documents-with.html

--
Mauricio

Thalai Selvam

unread,
May 6, 2011, 12:32:37 AM5/6/11
to sol...@googlegroups.com
how many fields you take to test, i have used 15 fields to index.

Mauricio Scheffer

unread,
May 6, 2011, 7:07:07 AM5/6/11
to sol...@googlegroups.com
As I said, you have to try and play with the batch size and find *your* optimum for *your* case.

--
Mauricio
Reply all
Reply to author
Forward
0 new messages