use of org.apache.jackrabbit.oak.plugins.index.elastic.index.ElasticDocumentMaker in project jackrabbit-oak by apache.
the class ElasticIndexer method index.
@Override
public boolean index(NodeStateEntry entry) throws IOException, CommitFailedException {
if (getFilterResult(entry.getPath()) != PathFilter.Result.INCLUDE) {
return false;
}
IndexDefinition.IndexingRule indexingRule = definition.getApplicableIndexingRule(entry.getNodeState());
if (indexingRule == null) {
return false;
}
ElasticDocumentMaker maker = newDocumentMaker(indexingRule, entry.getPath());
ElasticDocument doc = maker.makeDocument(entry.getNodeState());
if (doc != null) {
writeToIndex(doc, entry.getPath());
progressReporter.indexUpdate(definition.getIndexPath());
return true;
}
return false;
}
Aggregations