I am getting sometimes timeouts while inserting documents into Solr with SolrJ. Now I am searching for a solution and thought, maybe the autocommit could be a possible approach. I can set it directly in the solrConfig.xml or I can use CommitWithin in e.g. SorlJ.
Currently I am inserting documents, via addBeans, which is nice, because it's so comfortable.
UpdateRequest req = new UpdateRequest(); req.add(mySolrInputDocument); req.setCommitWithin(10000); req.process(server);
I don't know, if the general autoCommit is wise to set. It sounds like a 'hard' approach to me. And when I read the comment written in the solrconfig.xml
Instead of enabling autoCommit, consider using "commitWithin" when adding documents.
I'm even more against this solution. Is the CommitWithin the smarter solution, which then of course means to write more code?
BTW: is it possible to add beans using the commitWithin feature?