SOLR-121 just got applied to the Solrb library, which allows
Solr::Connection#add to accept arrays of documents:
connection.add([doc1, doc2, doc3])
Which means you can do something like this:
connection.add(records.map { |r| make_solr_doc(r) })
Posting more than a single document in a request speeds things up by
quite a bit -- I've got a batch job which adds 250K+ documents to an
index in less than an hour -- about 10 fields, only the doc id stored.
On 1/29/07, Yonik Seeley <[EMAIL PROTECTED]> wrote:
On 1/29/07, Antonio Eggberg <[EMAIL PROTECTED]> wrote:
> Is it a good practice to do <commit> after every insert .. is this what is
taking the time.. are there any general rule of thumb.
Definitely don't do a commit after every insert. Do a single one at the end.
-Yonik
--
Coda Hale
http://blog.codahale.com