use of org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition in project jackrabbit-oak by apache.
the class NRTIndexFactoryTest method noIndexForAsync.
@Test
public void noIndexForAsync() throws Exception {
IndexDefinition idxDefn = new IndexDefinition(root, builder.getNodeState(), "/foo");
assertNull(indexFactory.createIndex(idxDefn));
}
use of org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition in project jackrabbit-oak by apache.
the class NRTIndexFactoryTest method indexCreationSync.
@Test
public void indexCreationSync() throws Exception {
IndexDefinition idxDefn = getNRTIndexDefinition("/foo");
NRTIndex idx1 = indexFactory.createIndex(idxDefn);
assertNotNull(idx1);
assertEquals(1, indexFactory.getIndexes("/foo").size());
}
use of org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition in project jackrabbit-oak by apache.
the class DefaultIndexWriterTest method lazyInit.
@Test
public void lazyInit() throws Exception {
IndexDefinition defn = new IndexDefinition(root, builder.getNodeState(), "/foo");
DefaultIndexWriter writer = new DefaultIndexWriter(defn, builder, null, INDEX_DATA_CHILD_NAME, SUGGEST_DATA_CHILD_NAME, false);
assertFalse(writer.close(0));
}
Aggregations