lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Coda Hale" <coda.h...@gmail.com>
Subject Re: How fast is Solr insert or am i doing something wrong?
Date Tue, 30 Jan 2007 00:34:36 GMT
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 <yonik@apache.org> wrote:
> On 1/29/07, Antonio Eggberg <antonio_eggberg@yahoo.se> 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

Mime
View raw message