/** Repairs the index using previously returned result * from {@link #checkIndex}. Note that this does not * remove any of the unreferenced files after it's done; * you must separately open an {@link IndexWriter}, which * deletes unreferenced files when it's created. * * <p><b>WARNING</b>: this writes a * new segments file into the index, effectively removing * all documents in broken segments from the index. * BE CAREFUL. */ public void exorciseIndex(Status result) throws IOException { ensureOpen(); if (result.partial) { throw new IllegalArgumentException("can only exorcise an index that was fully checked (this status checked a subset of segments)"); } result.newSegments.changed(); result.newSegments.commit(result.dir); }
ensureOpen(); long startNS = System.nanoTime(); NumberFormat nf = NumberFormat.getInstance(Locale.ROOT);
/** Repairs the index using previously returned result * from {@link #checkIndex}. Note that this does not * remove any of the unreferenced files after it's done; * you must separately open an {@link IndexWriter}, which * deletes unreferenced files when it's created. * * <p><b>WARNING</b>: this writes a * new segments file into the index, effectively removing * all documents in broken segments from the index. * BE CAREFUL. */ public void exorciseIndex(Status result) throws IOException { ensureOpen(); if (result.partial) throw new IllegalArgumentException("can only exorcise an index that was fully checked (this status checked a subset of segments)"); result.newSegments.changed(); result.newSegments.commit(result.dir); }
/** Repairs the index using previously returned result * from {@link #checkIndex}. Note that this does not * remove any of the unreferenced files after it's done; * you must separately open an {@link IndexWriter}, which * deletes unreferenced files when it's created. * * <p><b>WARNING</b>: this writes a * new segments file into the index, effectively removing * all documents in broken segments from the index. * BE CAREFUL. */ public void exorciseIndex(Status result) throws IOException { ensureOpen(); if (result.partial) throw new IllegalArgumentException("can only exorcise an index that was fully checked (this status checked a subset of segments)"); result.newSegments.changed(); result.newSegments.commit(result.dir); }
/** Repairs the index using previously returned result * from {@link #checkIndex}. Note that this does not * remove any of the unreferenced files after it's done; * you must separately open an {@link IndexWriter}, which * deletes unreferenced files when it's created. * * <p><b>WARNING</b>: this writes a * new segments file into the index, effectively removing * all documents in broken segments from the index. * BE CAREFUL. */ public void exorciseIndex(Status result) throws IOException { ensureOpen(); if (result.partial) { throw new IllegalArgumentException("can only exorcise an index that was fully checked (this status checked a subset of segments)"); } result.newSegments.changed(); result.newSegments.commit(result.dir); }
ensureOpen(); long startNS = System.nanoTime(); NumberFormat nf = NumberFormat.getInstance(Locale.ROOT);
ensureOpen(); long startNS = System.nanoTime(); NumberFormat nf = NumberFormat.getInstance(Locale.ROOT);
ensureOpen(); long startNS = System.nanoTime(); NumberFormat nf = NumberFormat.getInstance(Locale.ROOT);