@Nullable private IndexPlan.Builder defaultPlan() { // With OAK-7947 lucene indexes return a non-null index node to delay reading index files // While IndexNode could have a status check method but for now we are using this work-around // to check null on {@code getIndexStatistics()} as proxy indicator // (this could be avoided by returning lazy statistics) if (indexNode.getIndexStatistics() == null) { return null; } return new IndexPlan.Builder() .setCostPerExecution(definition.getCostPerExecution()) .setCostPerEntry(definition.getCostPerEntry()) .setFulltextIndex(definition.isFullTextEnabled()) .setIncludesNodeData(false) // we should not include node data .setFilter(filter) .setPathPrefix(getPathPrefix()) .setSupportsPathRestriction(definition.evaluatePathRestrictions()) .setDelayed(true) //Lucene is always async .setDeprecated(definition.isDeprecated()) .setAttribute(FulltextIndex.ATTR_PLAN_RESULT, result) .setEstimatedEntryCount(estimatedEntryCount()) .setPlanName(indexPath); }
private IndexPlan.Builder planBuilder(Filter filter) { return new IndexPlan.Builder() .setCostPerExecution(1.5) // disk I/O + network I/O .setCostPerEntry(0.3) // with properly configured SolrCaches ~70% of the doc fetches should hit them .setFilter(filter) .setFulltextIndex(true) .setIncludesNodeData(true) // we currently include node data .setDelayed(true); //Solr is most usually async }
private IndexPlan.Builder planBuilder(Filter filter) { return new IndexPlan.Builder() .setCostPerExecution(1.5) // disk I/O + network I/O .setCostPerEntry(0.3) // with properly configured SolrCaches ~70% of the doc fetches should hit them .setFilter(filter) .setFulltextIndex(true) .setIncludesNodeData(true) // we currently include node data .setDelayed(true); //Solr is most usually async }
protected static IndexPlan.Builder planBuilder(Filter filter){ return new IndexPlan.Builder() .setCostPerExecution(0) // we're local. Low-cost .setCostPerEntry(1) .setFilter(filter) .setFulltextIndex(true) .setEstimatedEntryCount(0) //TODO Fake it to provide constant cost for now .setIncludesNodeData(false) // we should not include node data .setDelayed(true); //Lucene is always async }
protected static IndexPlan.Builder planBuilder(Filter filter){ return new IndexPlan.Builder() .setCostPerExecution(0) // we're local. Low-cost .setCostPerEntry(1) .setFilter(filter) .setFulltextIndex(true) .setEstimatedEntryCount(0) //TODO Fake it to provide constant cost for now .setIncludesNodeData(false) // we should not include node data .setDelayed(true); //Lucene is always async }