/**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Best to run this test w/ plenty of RAM (because of the
// terms index):
//
// ant compile-test
//
// java -server -Xmx8g -d64 -cp .:lib/junit-4.7.jar:./build/classes/test:./build/classes/test-framework:./build/classes/java -Dlucene.version=4.0-dev -Dtests.directory=MMapDirectory -DtempDir=build -ea org.junit.runner.JUnitCore org.apache.lucene.index.Test2BTerms
//
private final int tokensPerDoc;
private int tokenCount;
private final char[] chars;
private int nextSave;
super();
this.tokensPerDoc = tokensPerDoc;
}
public boolean incrementToken() {
if (tokenCount >= tokensPerDoc) {
return false;
}
tokenCount++;
if (--nextSave == 0) {
savedTerms.add(s);
}
return true;
}
public void reset() {
tokenCount = 0;
}
}
@Ignore("Takes ~4 hours to run on a fast machine!!")
if (true) {
.setRAMBufferSizeMB(256.0)
if (mp instanceof LogByteSizeMergePolicy) {
// 1 petabyte:
}
field.setOmitNorms(true);
//w.setInfoStream(System.out);
for(int i=0;i<numDocs;i++) {
w.addDocument(doc);
}
w.forceMerge(1);
w.close();
}
if (savedTerms == null) {
savedTerms = findTerms(r);
}
final List<String> bigOrdTerms = new ArrayList<String>(savedTerms.subList(numSavedTerms-10, numSavedTerms));
testSavedTerms(r, savedTerms);
r.close();
}
if (--nextSave == 0) {
}
}
return savedTerms;
}
byte[] bytes;
try {
} catch (UnsupportedEncodingException uee) {
throw new RuntimeException(uee);
}
for(byte b : bytes) {
}
}
}
IndexSearcher s = new IndexSearcher(r);
boolean failed = false;
if (count <= 0) {
failed = true;
}
failed = true;
}
}
}
}