looks like a very good idea, does this mean people don&#39;t need to do this (taken from docs):<br>&quot;It is critical that <tt class="literal">batchSize</tt> in the previous
    example matches the <tt class="literal">batch_size</tt> value described
    previously.&quot;<br>?<br>Should we remove the option and references from documentation?<br><br><div class="gmail_quote">2008/6/21 Emmanuel Bernard &lt;<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>&gt;:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><span style="border-collapse: collapse; font-family: Arial;"><div>I never liked the way we work around mass insertion and OOME today</div>
<div><br></div>hibernate.search.worker.batch_size has many drawbacks
 - the value is not accessible programatically
 - it applies to any operations regardless of mass indexing
 - it is used 99% of the time in close conjunction with a % and session.clear()
 - the side effect is quite big as the index is &quot;transactionally&quot; committed
 
To replace it, I introduced 
session.flushToIndexes();
this method manually triggers changes in queue. It does not trigger an hibernate core flush().

This seems more reasonable and will make the code safer.

WDYT? Better name?</span><div><font face="Arial"><span style="border-collapse: collapse;"><br></span></font><font color="#888888"><div> <span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="">
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="">
<div>--</div><div>Emmanuel Bernard</div><div><a href="mailto:emmanuel@hibernate.org" target="_blank">emmanuel@hibernate.org</a></div><div><a href="http://in.relation.to" target="_blank">http://in.relation.to</a></div><div>
<a href="http://blog.emmanuelbernard.com" target="_blank">http://blog.emmanuelbernard.com</a></div><div><a href="http://twitter.com/emmanuelbernard" target="_blank">http://twitter.com/emmanuelbernard</a></div></div></span></div>
</span> </div><br></font></div></div><br>_______________________________________________<br>
hibernate-dev mailing list<br>
<a href="mailto:hibernate-dev@lists.jboss.org">hibernate-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/hibernate-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/hibernate-dev</a><br>
<br></blockquote></div><br>