use of jetbrains.exodus.core.dataStructures.hash.HashSet in project xodus by JetBrains.
the class ExodusLuceneTestsBase method removeStopWord.
protected void removeStopWord(final String stopWord) {
final HashSet<Object> stopSet = new HashSet<>();
for (Object word : ((StopwordAnalyzerBase) analyzer).getStopwordSet()) {
if (!stopWord.equals(new String((char[]) word))) {
stopSet.add(word);
}
}
analyzer = new EnglishAnalyzer(LUCENE_VERSION, stopSet);
}
use of jetbrains.exodus.core.dataStructures.hash.HashSet in project xodus by JetBrains.
the class TreeCursorNoDuplicatesTest method testRandomInserts.
@Test
public void testRandomInserts() {
final ByteIterable value = value("value");
final Set<String> keys = new HashSet<>();
for (int i = 0; i < 10000; ++i) {
keys.add(rndString());
}
tm = createMutableTree(false, 1);
for (final String key : keys) {
Assert.assertTrue(tm.add(key(key), value));
}
testCursorOrder(new TreeSet<>(keys));
}
Aggregations