great! well I never use autoCommit=true.
However the documentation states that autoCommit=true. How do we disable this? In 2.3 I used to do a: writer.setMaxBufferedDocs(IndexWriter.DISABLE_AUTO_FLUSH); would that totally disable autoCommit, or will it autoCommit when the ram usage reaches a certain criteria. Best. On Mon, Sep 15, 2008 at 10:05 PM, Michael McCandless <[EMAIL PROTECTED]> wrote: > > Cam Bazz wrote: > >> Hello, >> >> I see that IndexWriter.flush() is depreciated in 2.4. What do we use? > > Looks like you already found it, but the javadoc says this: > > * @deprecated please call [EMAIL PROTECTED] #commit()}) instead > >> >> Also I used to make a: >> >> try { >> nodeWriter = new IndexWriter(nodeDir, true, analyzer, false); >> } catch(FileNotFoundException e) { >> nodeWriter = new IndexWriter(nodeDir, true, analyzer, true); >> } >> >> >> it seems that the constructor for indexwriter is also depreciated. > > I just fixed the javadoc to say: > > * Use [EMAIL PROTECTED] > #IndexWriter(Directory,Analyzer,boolean,MaxFieldLength)} > instead. > > There were two changes that affect that constructor. First, the autoCommit > boolean will go away in 3.0, and IndexWriter will be hardwired to > "autoCommit=false". You can always call commit on your own schedule if > needed. Second, all IndexWriter ctor's now take an > IndexWriter.MaxFieldLength instance (you can use LIMITED or UNLIMITED, or > make your own). This is just making the usual maxFieldLength setting in > IndexWriter more in-your-face so that everyone is aware when they make an > IndexWriter that it can truncate input documents (since it was a trap > before). > > Mike > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]