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]

Reply via email to