[Neo] Neo4j for personal information database
johan at neotechnology.com
Mon Sep 1 22:38:50 CEST 2008
I think we could add a collection utility that keeps a set of nodes
sorted according to a comparator given at creation time (of the
collection utility). Later we could add support so an exception is
thrown if the comparator is not serializable but for now we can just
do a quick implementation where the right comparator has to be passed
in constructor to maintain consistent state.
I'll create a ticket for this and hopefully someone will see to it
quite soon (we are currently quite busy with the upcoming release).
On Tue, Aug 26, 2008 at 4:53 PM, Nils Kaiser <NilsKaiser at gmx.net> wrote:
> The comparator approach sounds more suited to me as well... sorting
> should probably not be done in memory here, and it might make sense to
> generate some indexes to allow quick filtering within that collection or
> graph subset or so.
> Has anyone done anything similar yet? That requirement seems to be the
> only thing preventing me to give a Neo4j a go (vs. for example jackrabbit).
> Please correct me if anything doesnt make sense!
> Anders Nawroth schrieb:
>> A sorted structure seems like a really good idea to me.
>> But i'd rather like to see something more generic, where the user
>> provides a Comparator<Node> implementation.
>> One reason for this is that Strings can be sorted in different ways,
>> using different Locales, case in/sensitive and so on. If there is a
>> clear benefit from it, some common use cases could be covered by
>> prebuilt Comparators. Or code snippets in the documentation (would be my
>> choice) laying out common use cases.
>> And the user could also do so much more fun things with a Comparator to
>> play with :-)
More information about the User