List of usage examples for org.apache.mahout.cf.taste.impl.recommender NullRescorer getUserInstance
public static IDRescorer getUserInstance()
From source file:org.zaizi.mahout.alfresco.recommender.AbstractAlfrescoRecommendationService.java
License:Open Source License
public List<NodeRef> getRecommendations(int numResults) throws TasteException { String username = AuthenticationUtil.getFullyAuthenticatedUser(); long userId = ZaiziAlfrescoServiceUtil.getUserId(username); List<NodeRef> nodeRefs = null; try {/*from w w w .j a v a2 s . c o m*/ nodeRefs = getRecommendationService().getRecommendations(userId, numResults, NullRescorer.getUserInstance()); } catch (TasteException e) { getLogger().error("Error obtaining recommendations: " + e.getMessage(), e); throw e; } return nodeRefs; }