Right, issuing a commit after every document is not good practice. Relying on the auto commit parameters in solrconfig.xml is usually best, although I will sometimes issue a commit at the very end of the indexing run.
Several things about this thread aren't making sense. First of all your commitwithin parameter (your server.add(doc, int) is not soft committing anything, it's just telling solr to commit documents in the future). But you should be seeing these after 10 seconds. Check your solrconfig and insure that your autocommit settings have <openSearcher>true</openSearcher> set, that could possibly be what you're seeing. The fact that you have all those segments indicates that the commits are going through, so maybe you just have openSearcher set to false. This is almost certainly an assumption you're making that's not so, what you're doing _should_ work.... For that matter, what are your soft commit settings in solrconfig.xml? Best Erick On Tue, Jul 23, 2013 at 11:48 AM, tskom <tsiedlac...@hotmail.co.uk> wrote: > Thanks for your comment Eric. > > When I use .... *server.add(doc);* - everything is fine (but takes long time > to hard commit every single doc) , so I am sure docs are uniquely indexed. > > Maybe I shouldn't do *server.commit();* at all from solrj code, so SOLR > would use autoCommit/autoSoftCommit configuration defined in solrconfig.xml > ? > > Maybe there are some bits missing ? > > > > > > > > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/softCommit-doesn-t-work-tp4079578p4079772.html > Sent from the Solr - User mailing list archive at Nabble.com.