Search in sources :

Example 16 with IndexDefinitionBuilder

use of org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder in project jackrabbit-oak by apache.

the class ExternalIndexObserverTest method createNRTIndex.

private static IndexDefinition createNRTIndex(String ruleName) {
    IndexDefinitionBuilder idx = new IndexDefinitionBuilder();
    idx.indexRule(ruleName).property("foo").propertyIndex();
    idx.async("async", "sync");
    return new IndexDefinition(INITIAL_CONTENT, idx.build(), "/oak:index/foo");
}
Also used : IndexDefinition(org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition) IndexDefinitionBuilder(org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder)

Aggregations

IndexDefinitionBuilder (org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder)16 Tree (org.apache.jackrabbit.oak.api.Tree)9 Test (org.junit.Test)9 AbstractQueryTest (org.apache.jackrabbit.oak.query.AbstractQueryTest)7 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)7 NodeBuilder (org.apache.jackrabbit.oak.spi.state.NodeBuilder)3 Node (javax.jcr.Node)2 IndexInfo (org.apache.jackrabbit.oak.plugins.index.IndexInfo)2 TypeEditorProvider (org.apache.jackrabbit.oak.plugins.nodetype.TypeEditorProvider)2 Session (javax.jcr.Session)1 AsyncIndexInfo (org.apache.jackrabbit.oak.plugins.index.AsyncIndexInfo)1 AsyncIndexInfoService (org.apache.jackrabbit.oak.plugins.index.AsyncIndexInfoService)1 AsyncIndexInfoServiceImpl (org.apache.jackrabbit.oak.plugins.index.AsyncIndexInfoServiceImpl)1 IndexDefinition (org.apache.jackrabbit.oak.plugins.index.lucene.IndexDefinition)1 IndexRule (org.apache.jackrabbit.oak.plugins.index.lucene.util.IndexDefinitionBuilder.IndexRule)1 DefaultIndexWriterFactory (org.apache.jackrabbit.oak.plugins.index.lucene.writer.DefaultIndexWriterFactory)1 LuceneIndexWriter (org.apache.jackrabbit.oak.plugins.index.lucene.writer.LuceneIndexWriter)1 NodeStateUtils.getNode (org.apache.jackrabbit.oak.spi.state.NodeStateUtils.getNode)1 Document (org.apache.lucene.document.Document)1