@Test public void regexAllProps() { LuceneIndexDefinitionBuilder builder = new LuceneIndexDefinitionBuilder(); builder.indexRule("nt:base").property("p"); builder.indexRule("nt:base").property("all", FulltextIndexConstants.REGEX_ALL_PROPS, true); IndexDefinition def = IndexDefinition.newBuilder(root, builder.build(), "/foo").build(); IndexingRule rule = def.getApplicableIndexingRule(root); assertNotNull(rule); PropertyDefinition pd = rule.getConfig("p"); assertNotNull(pd); assertFalse(pd.isRegexp); assertFalse(pd.relative); assertEquals(0, pd.ancestors.length); pd = rule.getConfig("all"); assertNotNull(pd); assertTrue(pd.isRegexp); assertFalse(pd.relative); assertEquals(0, pd.ancestors.length); assertThat(rule.getAggregate().getIncludes(), is(empty())); assertFalse(rule.getAggregate().hasNodeAggregates()); List<Aggregate.Matcher> matchers = rule.getAggregate() .createMatchers(new TestRoot("/")); assertThat(matchers, is(empty())); assertThat(def.getRelativeNodeNames(), is(empty())); }
public static Builder newBuilder(NodeState root, NodeState defn, String indexPath){ return (Builder)new Builder() .root(root) .defn(defn) .indexPath(indexPath); }
LuceneIndexDefinition extends IndexDefinition { public static Builder newBuilder(NodeState root, NodeState defn, String indexPath){ return (Builder)new Builder() .root(root) .defn(defn) .indexPath(indexPath); } }
LuceneIndexDefinition extends IndexDefinition { public static Builder newBuilder(NodeState root, NodeState defn, String indexPath){ return (Builder)new Builder() .root(root) .defn(defn) .indexPath(indexPath); } LuceneIndexDefinition(NodeState root, NodeState defn, String indexPath);   LuceneIndexDefinition(NodeState root, NodeState defn, IndexFormatVersion version, String uid, String indexPath); }
LuceneIndexDefinition extends IndexDefinition { public static Builder newBuilder(NodeState root, NodeState defn, String indexPath){ return (Builder)new Builder() .root(root) .defn(defn) .indexPath(indexPath); } LuceneIndexDefinition(NodeState root, NodeState defn, String indexPath);   LuceneIndexDefinition(NodeState root, NodeState defn, IndexFormatVersion version, String uid, String indexPath); static Builder newBuilder(NodeState root, NodeState defn, String indexPath); boolean saveDirListing(); @Nullable Codec getCodec(); @NotNull MergePolicy getMergePolicy(); Analyzer getAnalyzer(); }
LuceneIndexDefinition extends IndexDefinition { public static Builder newBuilder(NodeState root, NodeState defn, String indexPath){ return (Builder)new Builder() .root(root) .defn(defn) .indexPath(indexPath); } LuceneIndexDefinition(NodeState root, NodeState defn, String indexPath);   LuceneIndexDefinition(NodeState root, NodeState defn, IndexFormatVersion version, String uid, String indexPath); static Builder newBuilder(NodeState root, NodeState defn, String indexPath); boolean saveDirListing(); @Nullable Codec getCodec(); @NotNull MergePolicy getMergePolicy(); Analyzer getAnalyzer();  }