That sounds good, but no matter how I try I can't find a jar of neo-utils. I know everybody uses maven where things just float around in the sky and automagically appear at the right moment, but surely using maven isn't mandatory?
Philip On 4/27/08, Emil Eifrem <[EMAIL PROTECTED]> wrote: > On Sun, Apr 27, 2008 at 9:59 AM, Philip Jägenstedt <[EMAIL PROTECTED]> wrote: > > > What are my options? http://wiki.neo4j.org/content/Design_Guide#Search > > assumes that I know what Maven is and want to use it. I've found > > http://components.neo4j.org/index-util/ but can't find any API > > documentation. Can I use it without jumping through Maven hoops? > > > Hi Philip, > > Sounds like a cool project! We're behind on getting our documentation > up to shape but what you want to do is this: > > 1. Use an IndexService from the index-util component that you > mentioned. An IndexService is an indexing implementation that can > maintain indexes for more than one property key. It has several > implementations, backed by various indexing technologies (such as > Lucene or BTree-on-top-of-Neo, etc). > > 2. IndexService is mentioned on the component documentation that > you found at http://components.neo4j.org/index-util/ and you can find > the javadocs at: > > http://components.neo4j.org/index-util/apidocs/ > > (for some reason, it doesn't generate the link to the apidocs on the > main component page -- will look into that.). > > 3. For simplicity, I suggest that you use the Neo-based > NeoIndexService implementation, i.e. IndexService uuidIndex = new > NeoIndexService( neo ); It's a one-liner to swap it out for something > else if you need massive scalability or performance. > > 4. In your factory (the single place in your business layer which > creates domain instances with UUIDs), you go something like > getMyUuidIndexService().index( theNewlyCreatedNode, "uuid", > convertToLong( theNewUuid ) ). > > 5. In your factory lookup ("getArtistByUuid( UUID uuid )") you go: > > return new Artist( getMyUuidIndexService().getSingleNodeFor( > convertToLong(uuid) ) ); > > The Artist class would then have a package protected constructor that > takes an underlying node, as outlined in the Design Guide (I believe). > > I'm not too sure about the convertToLong() method, maybe you need a > smarter way to convert your UUIDs to a Neo-supported value type. Or > maybe you can live with that loss of precision. > > > > > > Equally importantly, what indexing options are there with the Python > wrapper? > > > Tobias? > > > > > > This must be a very common problem, so I hope there is a better > > solution than using a single table in a relational database as an > > index... > > > I would certainly hope so! > > Cheers, > > > -- > Emil Eifrém, CEO [EMAIL PROTECTED] > Neo Technology, www.neotechnology.com > Cell: +46 733 462 271 | US: 206 403 8808 > > _______________________________________________ > 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