Hi all,
I'm new to graph databases and spring, trying to learn from the examples on git. I downloaded the HelloWorlds example and got everything working. what I'd like to do is add a tags property to Worlds, so one could tag Earth is 'blue', 'water', 'civilization', etc. I added some tags to every world. What i'd like to be able to do is search by tag and get all worlds.
so I added to World; I put set by varargs in constructor
And added method to WorldRepositoryImplPHP Code:@Indexed(indexName = "tags-index")
private Set<String> tags = new HashSet<String>();
I added call to appPHP Code:public Iterable<World> findResourcesByTag(String tag) {
return worldRepository.findAllByPropertyValue("tags-index", "tags", tag);
}
but it returns nothing, when I started stepping thru but couldn't really follow along. I thought trying to make it a relationship but what would the end node be? A tag class didn't seem efficient, but maybe i was wrong? Ideas?PHP Code:Iterable<World> bWorlds = repo.findResourcesByTag("blue");
Thanks for any advise!


Reply With Quote
