Created
April 29, 2014 12:00
-
-
Save vthacker/11398124 to your computer and use it in GitHub Desktop.
No Compound Files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testAddIndexes() throws IOException { | |
Directory d = new MMapDirectory(new File("/tmp/lucene")); | |
Analyzer analyzer = new StandardAnalyzer(Version.LUCENE_47); | |
IndexWriterConfig iwConfig = new IndexWriterConfig(Version.LUCENE_47, analyzer); | |
MergePolicy policy = new TieredMergePolicy(); | |
policy.setNoCFSRatio(0.0); | |
//iwConfig.setMergePolicy(policy); | |
iwConfig.setMergePolicy(NoMergePolicy.NO_COMPOUND_FILES); | |
IndexWriter w = new IndexWriter(d, iwConfig); | |
for(int i=0; i < 1000000 * 10; i++) { | |
Document doc = new Document(); | |
doc.add(new NumericDocValuesField("dv", i)); | |
w.addDocument(doc); | |
if(i % 1000000 == 0) { | |
System.out.println("New Segment"); | |
w.commit(); | |
} | |
} | |
w.close(); | |
d.close(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _0.cfe | |
-rw-r--r-- 1 varun wheel 328B Apr 29 17:29 _0.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _0.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _1.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _1.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _1.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _2.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _2.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _2.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _3.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _3.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _3.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _4.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _4.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _4.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _5.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _5.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _5.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _6.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _6.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _6.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _7.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _7.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _7.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _8.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _8.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _8.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _9.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _9.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _9.si | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:29 _a.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:29 _a.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:29 _a.si | |
-rw-r--r-- 1 varun wheel 20B Apr 29 17:29 segments.gen | |
-rw-r--r-- 1 varun wheel 441B Apr 29 17:29 segments_b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-rw-r--r-- 1 varun wheel 739K Apr 29 17:22 _a.fdt | |
-rw-r--r-- 1 varun wheel 19K Apr 29 17:22 _a.fdx | |
-rw-r--r-- 1 varun wheel 119B Apr 29 17:22 _a.fnm | |
-rw-r--r-- 1 varun wheel 340B Apr 29 17:22 _a.si | |
-rw-r--r-- 1 varun wheel 15M Apr 29 17:22 _a_Lucene45_0.dvd | |
-rw-r--r-- 1 varun wheel 63B Apr 29 17:22 _a_Lucene45_0.dvm | |
-rw-r--r-- 1 varun wheel 162B Apr 29 17:22 _b.cfe | |
-rw-r--r-- 1 varun wheel 1.7M Apr 29 17:22 _b.cfs | |
-rw-r--r-- 1 varun wheel 259B Apr 29 17:22 _b.si | |
-rw-r--r-- 1 varun wheel 20B Apr 29 17:22 segments.gen | |
-rw-r--r-- 1 varun wheel 117B Apr 29 17:22 segments_b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment