Linan,
I think your example would be great for doing a JUnit test showing
this. Niels, could you do that, pleeeez? In that case, I can add a
graph and exaplanations to it.

/peter

On Thu, Sep 8, 2011 at 11:25 PM, Linan Wang <[email protected]> wrote:
> On Wed, Sep 7, 2011 at 5:21 PM, Linan Wang <[email protected]> wrote:
>> hi,
>> I don't quite understand RelationshipIndex and RelationshipExpander.
>> say I have a supernode city (beijing), it has 10 m users links to
>> through relationship LIVES_IN. so how should I index? should be
>> something like:
>> RelationshipIndex idx = db.index().forRelationships("CITY_LIVES_IN");
>> idx.add(rel, "LIVES_IN", "Beijing");
>> if so, what's the advantage over this?
>> Index<Node> idx = db.index().forNodes("CITY_LIVES_IN");
>> idx.add(user, "LIVES_IN", "beijing");
>> (I read source code of LuceneIndex.java, found out that the
>> implementation of the add method is shared between Index<node> and
>> RelationshipIndex.)
> ok, i answer my own question:
> RelationshipIndex has the function query which takes startNode and
> endNode as extra parameters.
> so if traverse only depth 1, it could be faster than using Traverser.
> am i right here? (please say yes!)
> then the question is how to take advantage of it for more than 1?
>
>>
>> about RelationshipExpander. i don't see how RelationshipIndex could
>> help combining with RelationshipExpander, when use
>> GraphAlgoFactory.shortestPath(RelationshipExpander expander, int
>> maxDepth)?
>>
>> thanks for help!
>>
>> --
>> Best regards
>>
>> Linan Wang
>>
>
>
>
> --
> Best regards
>
> Linan Wang
> _______________________________________________
> Neo4j mailing list
> [email protected]
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo4j mailing list
[email protected]
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to