[Neo] Cleaning up relationshiptypes
I haven't found any functionality to remove relationshiptypes from the database. Once a relationshiptype is used it seems to remain in the database forever. This may be proper behaviour when relationshiptypes are relatively static, but when relationship types are added dynamically, there can exist a desire to clean-up no longer used relationshiptypes. Let me give an example. I am creating path expressions based upon the metamodel module. For example: Class(article) -- Relationship(author) -- Class(user) -- Property(name) This path expression can be used to traverse from an article to the name property of the user that is the author of the article. The path is stored in the database by taking a cryptographic hash of the string representation of the path, and use that as a relationship type name. Each unique path has a unique string representation. Taking a cryptographic hash of that string representation is for all practical purposes a unique key for that path. The start element of the path will have a property with a key equal to the the cryptographic hash of the string representation of the path (the value is irrelevant), and each step in the path is represented by a relationship, which name is equal to the cryptographic hash of the string representation of the path. These path expressions may come and go in the application. Some may be long lived, others will be removed and never be used again. Over time the database will be polluted with relationshiptypes that are no longer in use, and will probably never be used again. Niels Hoogeveen _ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo] Popularity sorting
Hi Johan, Just saw this response sometime later, and thats exactly what we did, this was fine as we had a max depth of 5 so wasn't such an issue. Cheers, Chris. On 17 February 2010 12:36, Johan Svensson jo...@neotechnology.com wrote: Chris, Sorry for long response time. The pattern matcher can only match a single exact depth/pattern at the moment. There is (currently) no way to configure it to match the way you describe. Instead you would have to generate a pattern for each depth meaning: product-customer-product product-customer-product-customer-product product-customer-product-customer-product-customer-product and so on. -Johan On Wed, Feb 10, 2010 at 5:10 PM, Chris Owen co...@thoughtworks.com wrote: Thanks for all the response, Johan the pattern matcher looks interesting. Following your example I see the results expected for matching the pattern product-customer-product from the selected node. This is what we want, though I wonder how we could repeat this match until a given depth is found i.e. product-customer-product-customer-product At first I thought that this would be the case and it was only the PropertyEqualConstraint on the propertyX pattern that was ensuring the the first node in the pattern had to be named a given value. This didn't seem to be the case though, as removing the constraint did nothing to the result set. Hope this makes sense, I'm still getting my head around all this. Chris ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Chris Owen Developer ThoughtWorks UK co...@thoughtworks.com Mobile: 07886711645 IM: chris.jowen Twitter: chrisjowen ___ Neo mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user