[Neo] Counting nodes
Hi all, For nodes that are kept in the indexed service, is there a more clever (and hopefully efficient) way to get the node count than manually iterating over all the nodes in the index and actually counting. I don't see anything obvious in the IndexService() interface, and am not sure if I've overlooked something useful somewhere else. I suppose I could always keep a running tally somewhere, but then I'd have to be careful to keep it in sync with reality. Ideally the count would be closer to the metal. Thanks, Andreas ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Counting nodes
The service API has a getAllNodes() call. Iterate and count through it. -AndreasAndreas Kollegger wrote: Hi all, For nodes that are kept in the indexed service, is there a more clever (and hopefully efficient) way to get the node count than manually iterating over all the nodes in the index and actually counting. I don't see anything obvious in the IndexService() interface, and am not sure if I've overlooked something useful somewhere else. I suppose I could always keep a running tally somewhere, but then I'd have to be careful to keep it in sync with reality. Ideally the count would be closer to the metal. Thanks, Andreas ___ 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
Re: [Neo] Counting nodes
actually, disregard my suggestion as I didn't read the word index in your question before. -AndreasAndreas Guenther wrote: The service API has a getAllNodes() call. Iterate and count through it. -AndreasAndreas Kollegger wrote: Hi all, For nodes that are kept in the indexed service, is there a more clever (and hopefully efficient) way to get the node count than manually iterating over all the nodes in the index and actually counting. I don't see anything obvious in the IndexService() interface, and am not sure if I've overlooked something useful somewhere else. I suppose I could always keep a running tally somewhere, but then I'd have to be careful to keep it in sync with reality. Ideally the count would be closer to the metal. Thanks, Andreas ___ 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