Skip to content

Commit

Permalink
ISPN-2002 IndexWriter.optimize is deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanne authored and galderz committed Apr 24, 2012
1 parent 5673dc3 commit 48bcc77
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -218,7 +218,7 @@ public static void writeTextToIndex(Directory dir, int id, String text) throws I

public static void optimizeIndex(Directory dir) throws IOException {
IndexWriter iw = new IndexWriter(dir, LuceneSettings.analyzer, IndexWriter.MaxFieldLength.UNLIMITED);
iw.optimize();
iw.forceMerge(1, true);
iw.close();
}

Expand Down

0 comments on commit 48bcc77

Please sign in to comment.