I'm trying to use graphAware's neo4j recommendation engine (https://github.com/graphaware/neo4j-reco). I'm new to a lot of the technologies involved, but as I understand after I have my recommendation engine built I run the following to get my recommendations:
List<Recommendation<Node>> recoForVince = recommendationEngine.recommend(getPersonByName("Vince"), new SimpleConfig(2));
The examples getPersonByName is this:
private Node getPersonByName(String name) {
return IterableUtils.getSingle(getDatabase().findNodes(DynamicLabel.label("Person"), "name", name));
}
The problem is as I understand it that'll only work if your neo4j server is embedded. We are looking at using spring for our mvc setup and with that we'll have something like:
We will be getting our data with something like:
@Repository
public interface PersonRepository extends GraphRepository<Person> {
@Query("MATCH (p:Person) WHERE m.name = {name} RETURN p")
Person findByTitleContaining(@Param("name") String name);
}
or maybe returned as a Hashmap. My issue is I'm unclear how I can convert either of these results into a Node object that would be usable by the Graphaware framework or how I should go about getting a Node object.