log.trace("Found rule '{}' for NodeType '{}'", rule, rule.getNodeTypeName()); ntNames = Collections.singletonList(rule.getNodeTypeName()); if (ntReg.isNodeType(ntName, rule.getNodeTypeName())) { List<IndexingRule> perNtConfig = nt2rules.get(ntName); if (perNtConfig == null) {
if (filter.getSupertypes().contains(rule.getNodeTypeName())){ IndexDefinition.IndexingRule matchingRule = definition.getApplicableIndexingRule(rule.getNodeTypeName()); if (matchingRule == null && rule.getNodeTypeName().equals(filter.getNodeType())){ if (rule.getNodeTypeName().equals(JcrConstants.NT_BASE)){ return rule;
@Override protected boolean augmentCustomFields(final String path, final Document doc, final NodeState document) { boolean dirty = false; if (augmentorFactory != null) { Iterable<Field> augmentedFields = augmentorFactory .getIndexFieldProvider(indexingRule.getNodeTypeName()) .getAugmentedFields(path, document, definition.getDefinitionNodeState()); for (Field field : augmentedFields) { doc.add(field); dirty = true; } } return dirty; }
boolean ntBaseRule = NT_BASE.equals(indexingRule.getNodeTypeName()); Map<String, PropertyDefinition> relativePropDefns = new HashMap<>(); if (indexingRule.propertyIndexEnabled) {
/** * Creates a new indexing rule base on an existing one, but for a * different node type name. * * @param original the existing rule. * @param nodeTypeName the node type name for the rule. */ IndexingRule(IndexingRule original, String nodeTypeName) { this.nodeTypeName = nodeTypeName; this.baseNodeType = original.getNodeTypeName(); this.propConfigs = original.propConfigs; this.namePatterns = original.namePatterns; this.boost = original.boost; this.inherited = original.inherited; this.propertyTypes = original.propertyTypes; this.propertyIndexEnabled = original.propertyIndexEnabled; this.propAggregate = original.propAggregate; this.nullCheckEnabledProperties = original.nullCheckEnabledProperties; this.notNullCheckEnabledProperties = original.notNullCheckEnabledProperties; this.functionRestrictions = original.functionRestrictions; this.nodeScopeAnalyzedProps = original.nodeScopeAnalyzedProps; this.aggregate = combine(propAggregate, nodeTypeName); this.fulltextEnabled = aggregate.hasNodeAggregates() || original.fulltextEnabled; this.nodeFullTextIndexed = aggregate.hasNodeAggregates() || original.nodeFullTextIndexed; this.indexesAllNodesOfMatchingType = areAlMatchingNodeByTypeIndexed(); this.nodeNameIndexed = original.nodeNameIndexed; this.syncProps = original.syncProps; this.similarityProperties = original.similarityProperties; }
@Override protected boolean augmentCustomFields(final String path, final Document doc, final NodeState document) { boolean dirty = false; if (augmentorFactory != null) { Iterable<Field> augmentedFields = augmentorFactory .getIndexFieldProvider(indexingRule.getNodeTypeName()) .getAugmentedFields(path, document, definition.getDefinitionNodeState()); for (Field field : augmentedFields) { doc.add(field); dirty = true; } } return dirty; }
private static FulltextQueryTermsProvider getIndexAgumentor(IndexPlan plan, IndexAugmentorFactory augmentorFactory) { PlanResult planResult = getPlanResult(plan); if (augmentorFactory != null){ return augmentorFactory.getFulltextQueryTermsProvider(planResult.indexingRule.getNodeTypeName()); } return null; }
private static FulltextQueryTermsProvider getIndexAgumentor(IndexPlan plan, IndexAugmentorFactory augmentorFactory) { PlanResult planResult = getPlanResult(plan); if (augmentorFactory != null){ return augmentorFactory.getFulltextQueryTermsProvider(planResult.indexingRule.getNodeTypeName()); } return null; }