Hi all,We created custom code on Alfresco ECM 3.0 version, with our requirements to manage our documents. Now, the repository is too long and our custom code isn't as fast as we would like. We want to optimize lucene search to improve the speed.We change lucene.indexer.mergeFactor property as indicated in http://wiki.alfresco.com/wiki/Index_Merging_Performance. But Alfresco has several ways to search a NodeRef from a path, we want to review the search method to select the faster. We are using this one:example 1:
List<NodeRef> results = this.serviceRegistry.getSearchService()
.selectNodes(rootNodeRef, xpath, null, this.serviceRegistry.getNamespaceService(), false);
results.get(0);
But, another ways to get the same result are:example 2:
FileInfo folder = this.serviceRegistry.getFileFolderService().resolveNamePath(getBaseNodeRef(), pathElementsList);
folder.getNodeRef();
example 3:
List<NodeRef> results = this.serviceRegistry.getSearchService()
.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_LUCENE, xpath)";
results.get(0);
Could someone point me what is the best way to get the NodeRef of a node from its path? Is there any difference between them in terms of execution speed?Thanks a lot in advance,