Hi There is also another alternative available in Neo4j.rb (the JRuby Neo4j wrapper) by using lucene. In Neo4j.rb you have access to the full lucene query language.
Examples: Person.find(:name => 'kalle').sort_by(:salary) Person.find("name:kalle AND salary:[10000 TO 30000]").sort_by(Desc[:salary, :country]) Cheers /Andreas On Wed, Nov 18, 2009 at 1:07 AM, Anders Nawroth <and...@neotechnology.com> wrote: > Hi! > >> I want to use neo4j to build a prototype of a social network >> application because of his graph structure and I have a problem when I >> try to filter and sort the nodes resulted from traversal. >> For example - I want to show a list with members of a group filtered >> by some property and ordered by another; I don't find any optimization >> for filter/sort operations in neo. >> > > Regarding filtering, my first thought goes to using ReturnableEvaluator > when using a Traverser to find nodes. The ReturnableEvaluator decides > which nodes should go into the result. If you need to block traversal > beyond specific nodes or at a specific depth, have a look at the > StopEvalutor as well. You'll find some hints on searching in Neo4j here: > http://wiki.neo4j.org/content/Design_Guide#Search > The evaluators are described in the core APIdocs: > http://api.neo4j.org/current/ > > The structure of the node space can also be used to implement your very > own indexing/search stuff. You can find a practical example of that here: > http://wiki.neo4j.org/content/IMDB_Search_Engine > > For sorting, the simplest option is to do it in your own code. > > HTH! > > > /anders >> Do you have some implementation suggestions? Do you think that neo4j >> can be used for this kind of job? >> >> Thank you. >> _______________________________________________ >> Neo mailing list >> User@lists.neo4j.org >> https://lists.neo4j.org/mailman/listinfo/user >> > > _______________________________________________ > Neo mailing list > User@lists.neo4j.org > https://lists.neo4j.org/mailman/listinfo/user > _______________________________________________ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user