use of org.apache.lucene.index.LiveIndexWriterConfig in project crate by crate.
the class InternalEngineTests method testSettings.
@Test
public void testSettings() {
CodecService codecService = new CodecService(null, logger);
LiveIndexWriterConfig currentIndexWriterConfig = engine.getCurrentIndexWriterConfig();
assertEquals(engine.config().getCodec().getName(), codecService.codec(codecName).getName());
assertEquals(currentIndexWriterConfig.getCodec().getName(), codecService.codec(codecName).getName());
}
use of org.apache.lucene.index.LiveIndexWriterConfig in project orientdb by orientechnologies.
the class OLuceneIndexWriterFactoryTest method shouldCreateIndexWriterConfiguredWithMetadataValues.
@Test
public void shouldCreateIndexWriterConfiguredWithMetadataValues() throws Exception {
OLuceneIndexWriterFactory fc = new OLuceneIndexWriterFactory();
// sample metadata json
ODocument meta = new ODocument().fromJSON(OIOUtils.readFileAsString(new File("./src/test/resources/index_metadata_new.json")));
IndexWriter writer = fc.createIndexWriter(new RAMDirectory(), meta, new StandardAnalyzer());
LiveIndexWriterConfig config = writer.getConfig();
assertThat(config.getUseCompoundFile()).isFalse();
assertThat(config.getAnalyzer()).isInstanceOf(StandardAnalyzer.class);
assertThat(config.getMaxBufferedDocs()).isEqualTo(-1);
assertThat(config.getRAMPerThreadHardLimitMB()).isEqualTo(1024);
}
Aggregations