Otis Gospodnetic <[EMAIL PROTECTED]> wrote on 11/01/2007 06:25:59: > Hi, > > What do people here think about adding forceOptimize() to IndexWriter? > > public synchronized void forceOptimize() throws IOException { > flushRamSegments(); > int minSegment = segmentInfos.size() - mergeFactor; > mergeSegments(minSegment < 0 ? 0 : minSegment); > } > > I need it for https://issues.apache.org/jira/browse/LUCENE-741 > (Field Norms Modifier), which I wrote to work with multi-file > indices, which means that if there are any CFS index files in an > index, I need to expand those first. Is there a better way to > extract a CFS file in an index that may also contain some non-CFS > segments? There is a CfsExtractor tool in https://issues.apache. > org/jira/browse/LUCENE-770 now, maybe that will do for > LUCENE-741.... haven't tried it yet. > > Otis
I think one (non-performant) external way to move an index from CFS to non-CFS is: 1. open in non-CFS mode 2. add one (empty) doc 3. optimize 4. (optionally) remove last doc and (optionally) optimize again --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]