CallSpecification callSpec = new CallSpecification(id);
GitFunction function = functions.get(callSpec.getFunctionName());
if (function == null) return null;
try {
// Set up the document writer ...
DocumentWriter writer = newDocument(id);
String parentId = callSpec.getParentId();
assert parentId != null;
writer.setParent(parentId);
// check if the document should be indexed or not, based on the global connector setting and the specific function
if (!this.isQueryable() || !function.isQueryable(callSpec)) {
writer.setNotQueryable();
}
// Now call the function ...
Document doc = function.execute(repository, git, callSpec, writer, values);
// Log the result ...
getLogger().trace("ID={0},result={1}", id, doc);