Re: [Neo4j] Webadmin browser dependencies?
Excellent. I've got a fix for the problem with the visualization, just need to slot in the time to write and test it :) On Sun, Jun 26, 2011 at 6:48 AM, Tatham Oddie tat...@oddie.com.au wrote: Sorry, I should have clarified that it's just the visualization that doesn't work. Everything else is perfect. -- Tatham -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Jacob Hansson Sent: Saturday, 25 June 2011 3:25 AM To: Neo4j user discussions Subject: Re: [Neo4j] Webadmin browser dependencies? Is that the whole data browser, or is it just the visualization? In IE8, everything appears to work except two things, history support (clicking back doesn't change the url-hash), and the visualization. I'm gonna get a hold of a Windows 7-copy as well so that I can test this in IE9. /Jake On Thu, Jun 23, 2011 at 9:35 PM, Tatham Oddie tat...@oddie.com.au wrote: Everything except data browser works fine for me in IE9. -- Tatham -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Paul Bandler Sent: Friday, 24 June 2011 1:03 AM To: Neo4j user discussions Cc: Neo4j user discussions Subject: Re: [Neo4j] Webadmin browser dependencies? Thanks but none of those browsers are allowed to be downloaded within my clients corporate network... Again, does anyone know what IE level works? Sent from my iPhone On 23 Jun 2011, at 13:53, Tatham Oddie tat...@oddie.com.au wrote: Data browser works in Chome / Firefox / Safari. It should give you a message to this effect on unsupported browsers. -- Tatham -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Paul Bandler Sent: Thursday, 23 June 2011 10:30 PM To: Neo4j user discussions Subject: [Neo4j] Webadmin browser dependencies? Unable to access the data tab using IE version 7. Tried using the Eclipse built in browser and it momentarily switches to the data tab but then it disappears again. What are the supported browser platforms? Sent from my iPhone ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Jacob Hansson Phone: +46 (0) 763503395 Twitter: @jakewins ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Spring Data Graph Template query API proposal
Hi, I've been struggling with integrating all those different kinds of queries into a nice API for the Neo4jTemplate I want to avoid a proliferation of query methods like in JdbcTemplate, so my current approach is a builder pattern which looks like. QueryResultMapString,Object query(String statement); Person p = query(statement).to(Person.class).single() IterableLong orderSums = query(statement).to(Long.class, new ResultConverterMapString,Object,Long() {...}); IterableMapString,Object results = query(statement); query(statement).handle(new HandlerR() { public void handle(R value) {}}); same goes for index queries which just start with QueryResultPropertyContainer lookup(String index, String key, Object value); lookup(index,key,value) or IterableGroup groups = lookup(Group,name:Neo*).to(Group.class); Path nodePath = lookup(Movie,name,Matrix).to(Path.class).single(); and for traversals: QueryResultPath traverse(Node start, TraversalDescription desc) IterableNode endNodes = traverse(Node start, TraversalDesc).to(Node.class); What is your opinion about that? Just looking for input. Cheers Michael ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unexpected error
On Mon, Jun 27, 2011 at 11:56 PM, Michael Hunger michael.hun...@neotechnology.com wrote: Massimo, could you please look into the Lucene Document instance that you add all the fields to? You're right... I add only the NodeId and my own hash... Which fields do you add? If it also contains this ultralarge ArrayList with all the Fields ? As I said It only contains the Fields relative to the NodeId and the Hash And which version of lucene did you use for your standalone testing? I use 3.1.0. BTW I'm testing resin and even couchdb for the index part but I don't like it that much cause that index phase will be out of the node4j Transaction and I want to isolate all that operations in a Tranaction. Have you hint for me on how to extend the node4j Transaction... is that extensible? Thanks -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Deep search with Cypher Query Language
Lots of questions in one mail. My answers are inline. On Mon, Jun 27, 2011 at 10:55 PM, Adrian Stabiszewski mynewslet...@nitegate.de wrote: Hi! I'm currently evaluating Neo4J for a project, but I'm not sure if it is the right solution. Maybe you could help me by looking at my scenario. I have ca. 10 different types of nodes with properties which have directed relationships. Some types can only be connected to other types but others can also be connected to the same type (not the same node, circle relations are not allowed). Basically it looks like this: A-B-C-D-E or A-B-B-B-C-E or A-B-C-C-E Where each letter is a node type not the entity. Now, a common request for reporting is to find all nodes with specific properties that are connected. I tried to import all the data into a Neo4J DB and played around with the Cypher Query language, but without success. My basic idea of a query is like: start c=(typeIndex,node_type,C), e=(typeIndex,node_type,E) match(c)--(e) where (c.node_name = name) return c,e This only works if C and E have a direct relationship. I'm looking for all the E's that are somehow connected to C. Is this possible? Will it be possible in the near future? It is not possible now. It is however something that we want to have. We're closing in on the next stable release, and variable length connections are not going to make it into 1.4. It should be available soon after though, if nothing shakes the plan as we now know it. I know I can traverse the graph myself, but this would take too long. The above query takes some 10 seconds, which is also too long. 10 seconds? I'd love to know more about this. How many C nodes do you have? How many E nodes? Does it take ten seconds with cold or with warm caches? BTW: Some remarks about Cypher Query. With the current syntax it is not possible to have dots in the property name or at least I don't know how to escape them. This should work for you: start a = (1) return a.`n.a.m.e` I also had trouble (SyntaxError) to use the alternative start query with index and query (4.1.4. Node by index query). Is this implemented yet? How can one use indices in WHERE and MATCH statements? There are reasons why we have chosen not to expose things like index queries in the MATCH and WHERE statement. What is it that you are trying to do? Maybe I can help you figure out a better way of doing it? Thanks for the feedback! Andrés ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] afterRollback never called
Yes, you are right. Still, it may be interesting in some cases to be informed when rollbacks happen. Mattias, thanks for your help and comments! --- balazs On 6/27/11 4:03 PM, Mattias Persson wrote: Couldn't you count those in afterCommit instead? That way you would be sure to update your counter (which isn't stored in neo4j?) for stuff that's actually committed. 2011/6/27 Balazs E. Patakipat...@dsd.sztaki.hu Hi, So, an explicit failure() in a transaction doesn't count as a transaction failed for some reason then? I have a counter for the number of nodes created and written to DB in each transaction in the current thread. When the transaction fails, I would like to know about it and not count those created in this failed transaction (since these won't be written to DB). But now it seems I cannot always get a notification about failures/rollbacks. Or is there any other way to do this? Thanks, --- balazs On 6/27/11 11:50 AM, Mattias Persson wrote: Reading the javadoc: Invoked after the transaction has been rolled back if committing the transaction failed for some reason. so it wont be notified about transactions that never even start to commit. That's why you don't get any notifications about such transactions. Is there any specific reason as to why you'd like to know about those transactions? 2011/6/24 Balazs E. Patakipat...@dsd.sztaki.hu Hi, I'm using 1.4M03 and I have class implementing TransactionEventHandler. However it never receives an afterRollback() although I call failure() and finish() on the transaction. Otherwise the transaction seems to be rolled back, only my TransactionEventHandler is not informed about it. beforeCommit() and afterCommit() are received all right. I tracked it down to TransactionEventsSyncHook#afterCompletion() public void afterCompletion( int status ) { if ( status == Status.STATUS_COMMITTED ) { for ( HandlerAndState state : this.states ) { state.handler.afterCommit( this.transactionData, state.state ); } } else if ( status == Status.STATUS_ROLLEDBACK ) { if ( this.states == null ) { // This means that the transaction was never successful return; } for ( HandlerAndState state : this.states ) { state.handler.afterRollback( this.transactionData, state.state ); } } else { throw new RuntimeException( Unknown status + status ); } } There's a This means that the transaction was never successful part, and this where my code gets and hence afterRollback() is not called on my handler. Could there be any reason for this? Thanks, --- balazs ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] NonWritableChannelException
Paul, This could be related to the wrapper bug found if you are running the server. If the server was under heavy load and entered GC trashing (JVM stopping all threads just running GC) the wrapper thought the server was unresponsive and restarted it. This problem will be fixed in the 1.4.M05 release. Regards, Johan On Tue, Jun 21, 2011 at 1:22 PM, Paul Bandler pband...@cseuk.co.uk wrote: The above exception is thrown from the call stack indicated below while traversing a neo4j graph using the EmbedesReadOnly database. Using 1.4M04. The application is running with 1gb of heap with defaulting all other parameters except cache_type=weak on windows. I found some reports of this exception being thrown at shutdown back in January but this is not happening at shutdown and I could find no posted resolution of that thread anyway. Can anyone suggest what the cause if this exception is? Thanks Paul Exception in thread main java.nio.channels.NonWritableChannelException at sun.nio.ch.FileChannelImpl.write(Unknown Source) at org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:104) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.refreshBricks(PersistenceWindowPool.java:536) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.acquire(PersistenceWindowPool.java:128) at org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.acquireWindow(CommonAbstractStore.java:526) at org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:327) at org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114) at org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97) at org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108) at org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603) at org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:399) at org.neo4j.kernel.impl.core.IntArrayIterator.hasNext(IntArrayIterator.java:93) at org.neo4j.kernel.impl.core.NodeImpl.getSingleRelationship(NodeImpl.java:218) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] cassandra + neo4j graph
Thanx a lot jim, after a preliminary analysis we have found that user info will be about 2 mb of text max. But how to store the images videos etc . Just as references to a CDN or within the node.? Also where can the long conversatitions between 2+ users be stored ? Can it act as a relationship property refering to a CDN / cassandra or just neo relationship would suffice considering millions of conversations taking place at different points of time? Also a time line of the conversation needs to be constructed in real time . How efficient would it be and what design heuristics have to be kept in mind considering that temporal info needs to be updated and retrieved in real time? On 6/28/11, Jim Webber j...@neotechnology.com wrote: Hi Aliabbas, It's quite feasible to run multiple graph DBs, that's just manual sharding. In your application you own the mapping to which of the graph DBs you want to interact with, and your app also reifies links between instances. But do try a single instance first (with slave replication for read scale). You might find that it works well since you need to do a lot less writing with Neo4j than you do with RDBMS. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Aliabbas Petiwala M.Tech CSE ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Neo4j proof of efficiency
Hi, This may be of interest http://arxiv.org/abs/1004.1001 (The Graph Traversal Pattern) and http://markorodriguez.com/2011/02/18/mysql-vs-neo4j-on-a-large-scale-graph-traversal/ Regards, Johan 2011/6/27 Ian Bussières ian.bussieres.mailingli...@gmail.com: Hello, I am using neo4j in a school project. I was wondering if anyone could point me to a scientific paper or proof of concept - something with actual data - that would be useful to build a document that would prove graph databases to be more suited (performance, scalability and efficiency) to a social network-like application. I'm interested in any benchmarks or design keys of any sort, books, whatever. I've searched a lot but have failed to find enough relevant sources of information. Thanks ahead of time, Ian. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] cassandra + neo4j graph
Hey Aliabbas, It's unlikely that our store will be a good place for video - we're optimised around fast relationship traversal rather than big blobs. I'd recommend just hosting their (relative) URIs in Neo4j and exposing the files out on to the Web, hosted on the filesystem or in something like Riak which is optimised around opaque KV storage and retrieval. In terms of conversations between users - why not just model them explicitly. A--PARTICIPATED_IN(since: 2011-03-03)--Conversation1 B--PARTICIPATED_IN((since: 2011-03-03)--Conversation1 C--PARTICIPATED_IN((since: 2011-04-04)--Conversation1 Conversation1--FIRST_MESSAGE--Message1 Message1--NEXT--Message2 Message2--NEXT--Message3 Message1--SENT_BY--A Message12--SENT_BY--B Etc. Basically you really draw out the entities at the heart of your domain. The only gotcha I can think of here is if you have a Britney Spears moment where there is a rapid conversation meaning the latest MessageX node might become contended. But if your system has celebrity chat that's probably going to involve different application logic (e.g. moderation) anyway. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unexpected error
2011/6/28 Massimo Lusetti mluse...@gmail.com On Mon, Jun 27, 2011 at 11:56 PM, Michael Hunger michael.hun...@neotechnology.com wrote: Massimo, could you please look into the Lucene Document instance that you add all the fields to? You're right... I add only the NodeId and my own hash... Which fields do you add? If it also contains this ultralarge ArrayList with all the Fields ? As I said It only contains the Fields relative to the NodeId and the Hash And which version of lucene did you use for your standalone testing? I use 3.1.0. BTW I'm testing resin and even couchdb for the index part but I don't like it that much cause that index phase will be out of the node4j Transaction and I want to isolate all that operations in a Tranaction. Have you hint for me on how to extend the node4j Transaction... is that extensible? Very much so. You can look at how the lucene integration is done. You'll have to write another data source and make it participate in transactions. https://github.com/neo4j/community/blob/master/lucene-index/src/main/java/org/neo4j/index/impl/lucene/LuceneDataSource.java would be a good starting point. I don't think there are good tutorial/documentation on how to do these things though. Thanks -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Deep search with Cypher Query Language
Adrian, can you by chance share your dataset (or a generator that creates a similar one)? Then I'd like to profile the query. One other thing. From what I understand, those queries should return the same result, but they don't: start c=(typeIndex,node_type,C), e=(typeIndex,node_type,E) match(c)--(e) where (c.node_name = name) return c,e start c=(typeIndex,node_type,C) match(c)--(e) where (c.node_name = name) and (e.node_type = E) return c,e What do you expect and what did they return ? And is the node_type property indexed exactly as node_type in the index, and are _all_ nodes connected to c just _e_ nodes with the appropriate type? Thanks Michael ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unexpected error
Hi Massimo, still the lucene document holds an ArrayList with all fields which grows immensely as you add millions of fields. package org.apache.lucene.document; public final class Document implements java.io.Serializable { ListFieldable fields = new ArrayListFieldable(); } So perhaps the difference is that in Neo4j we have one Document per node/relationship, where all keys + values are added. Which builds up those large documents. It is unusual for Neo4j to have a single document that contains that many entries as you normally just index the keys to find certain nodes or relationships which normally are not more than a dozen. And that's why the neo4j lucene index implementation is and will be optimized for exactly this case. So I'd suggest as Mattias said you create your own datasource and handle the adding there (obviously just adding node-ids + hashes to an arbitrary lucene index. (with one doc per node-id (or hash). Cheers Michael Am 28.06.2011 um 10:21 schrieb Massimo Lusetti: On Mon, Jun 27, 2011 at 11:56 PM, Michael Hunger michael.hun...@neotechnology.com wrote: Massimo, could you please look into the Lucene Document instance that you add all the fields to? You're right... I add only the NodeId and my own hash... Which fields do you add? If it also contains this ultralarge ArrayList with all the Fields ? As I said It only contains the Fields relative to the NodeId and the Hash And which version of lucene did you use for your standalone testing? I use 3.1.0. BTW I'm testing resin and even couchdb for the index part but I don't like it that much cause that index phase will be out of the node4j Transaction and I want to isolate all that operations in a Tranaction. Have you hint for me on how to extend the node4j Transaction... is that extensible? Thanks -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unexpected error
Wow. Neo4J is optimized for keys to find certain nodes or relationships which normally are not more than a dozen. That's quite a surprise to me, and I hope it not to be the case! -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Michael Hunger Sent: Tuesday, June 28, 2011 7:58 AM To: Neo4j user discussions Subject: Re: [Neo4j] Unexpected error Hi Massimo, still the lucene document holds an ArrayList with all fields which grows immensely as you add millions of fields. package org.apache.lucene.document; public final class Document implements java.io.Serializable { ListFieldable fields = new ArrayListFieldable(); } So perhaps the difference is that in Neo4j we have one Document per node/relationship, where all keys + values are added. Which builds up those large documents. It is unusual for Neo4j to have a single document that contains that many entries as you normally just index the keys to find certain nodes or relationships which normally are not more than a dozen. And that's why the neo4j lucene index implementation is and will be optimized for exactly this case. So I'd suggest as Mattias said you create your own datasource and handle the adding there (obviously just adding node-ids + hashes to an arbitrary lucene index. (with one doc per node-id (or hash). Cheers Michael Am 28.06.2011 um 10:21 schrieb Massimo Lusetti: On Mon, Jun 27, 2011 at 11:56 PM, Michael Hunger michael.hun...@neotechnology.com wrote: Massimo, could you please look into the Lucene Document instance that you add all the fields to? You're right... I add only the NodeId and my own hash... Which fields do you add? If it also contains this ultralarge ArrayList with all the Fields ? As I said It only contains the Fields relative to the NodeId and the Hash And which version of lucene did you use for your standalone testing? I use 3.1.0. BTW I'm testing resin and even couchdb for the index part but I don't like it that much cause that index phase will be out of the node4j Transaction and I want to isolate all that operations in a Tranaction. Have you hint for me on how to extend the node4j Transaction... is that extensible? Thanks -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unexpected error
Per node and relationship. Btw. this is my personal opinion, not backed by the people who know better :) I tried to outline the problem below, if you add hundreds of thousands of keys for the same node, they are all aggregated in the same document which holds to its field-list as strong-references and as long as the document is in scope (in tx or cache) it won't be gc'ed. In Massimo's case there is a single node to which 250 million keys are indexed. I hope you agree that this is not the usual use-case for a graph-db-index ? Sorry for the confusion, Cheers Michael Am 28.06.2011 um 14:05 schrieb Rick Bullotta: Wow. Neo4J is optimized for keys to find certain nodes or relationships which normally are not more than a dozen. That's quite a surprise to me, and I hope it not to be the case! -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Michael Hunger Sent: Tuesday, June 28, 2011 7:58 AM To: Neo4j user discussions Subject: Re: [Neo4j] Unexpected error Hi Massimo, still the lucene document holds an ArrayList with all fields which grows immensely as you add millions of fields. package org.apache.lucene.document; public final class Document implements java.io.Serializable { ListFieldable fields = new ArrayListFieldable(); } So perhaps the difference is that in Neo4j we have one Document per node/relationship, where all keys + values are added. Which builds up those large documents. It is unusual for Neo4j to have a single document that contains that many entries as you normally just index the keys to find certain nodes or relationships which normally are not more than a dozen. And that's why the neo4j lucene index implementation is and will be optimized for exactly this case. So I'd suggest as Mattias said you create your own datasource and handle the adding there (obviously just adding node-ids + hashes to an arbitrary lucene index. (with one doc per node-id (or hash). Cheers Michael Am 28.06.2011 um 10:21 schrieb Massimo Lusetti: On Mon, Jun 27, 2011 at 11:56 PM, Michael Hunger michael.hun...@neotechnology.com wrote: Massimo, could you please look into the Lucene Document instance that you add all the fields to? You're right... I add only the NodeId and my own hash... Which fields do you add? If it also contains this ultralarge ArrayList with all the Fields ? As I said It only contains the Fields relative to the NodeId and the Hash And which version of lucene did you use for your standalone testing? I use 3.1.0. BTW I'm testing resin and even couchdb for the index part but I don't like it that much cause that index phase will be out of the node4j Transaction and I want to isolate all that operations in a Tranaction. Have you hint for me on how to extend the node4j Transaction... is that extensible? Thanks -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unexpected error
I think what Michael is saying is that you normally don't have many key/value pairs associated with one node/relationship in an index. To have 250M key/value pairs indexed in one lucene document is at most a corner case and that's why the neo4j--lucene integration isn't potimized for that. 2011/6/28 Rick Bullotta rick.bullo...@thingworx.com Wow. Neo4J is optimized for keys to find certain nodes or relationships which normally are not more than a dozen. That's quite a surprise to me, and I hope it not to be the case! -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Michael Hunger Sent: Tuesday, June 28, 2011 7:58 AM To: Neo4j user discussions Subject: Re: [Neo4j] Unexpected error Hi Massimo, still the lucene document holds an ArrayList with all fields which grows immensely as you add millions of fields. package org.apache.lucene.document; public final class Document implements java.io.Serializable { ListFieldable fields = new ArrayListFieldable(); } So perhaps the difference is that in Neo4j we have one Document per node/relationship, where all keys + values are added. Which builds up those large documents. It is unusual for Neo4j to have a single document that contains that many entries as you normally just index the keys to find certain nodes or relationships which normally are not more than a dozen. And that's why the neo4j lucene index implementation is and will be optimized for exactly this case. So I'd suggest as Mattias said you create your own datasource and handle the adding there (obviously just adding node-ids + hashes to an arbitrary lucene index. (with one doc per node-id (or hash). Cheers Michael Am 28.06.2011 um 10:21 schrieb Massimo Lusetti: On Mon, Jun 27, 2011 at 11:56 PM, Michael Hunger michael.hun...@neotechnology.com wrote: Massimo, could you please look into the Lucene Document instance that you add all the fields to? You're right... I add only the NodeId and my own hash... Which fields do you add? If it also contains this ultralarge ArrayList with all the Fields ? As I said It only contains the Fields relative to the NodeId and the Hash And which version of lucene did you use for your standalone testing? I use 3.1.0. BTW I'm testing resin and even couchdb for the index part but I don't like it that much cause that index phase will be out of the node4j Transaction and I want to isolate all that operations in a Tranaction. Have you hint for me on how to extend the node4j Transaction... is that extensible? Thanks -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Deep search with Cypher Query Language
can you by chance share your dataset (or a generator that creates a similar one)? Then I'd like to profile the query. Thanks for the offer, Michael. The dataset is a direct copy from my production data, so it is not possible to share it. One other thing. From what I understand, those queries should return the same result, but they don't: start c=(typeIndex,node_type,C), e=(typeIndex,node_type,E) match(c)--(e) where (c.node_name = name) return c,e start c=(typeIndex,node_type,C) match(c)--(e) where (c.node_name = name) and (e.node_type = E) return c,e What do you expect and what did they return ? And is the node_type property indexed exactly as node_type in the index, and are _all_ nodes connected to c just _e_ nodes with the appropriate type? The first query returns the expected results, the second query returns zero results. Node_type is correctly indexed because it is working with the first query. C nodes are connected with different nodes, but some of them are E nodes. This is basically a query like: find all male actors (node_type:C) who played in SiFi movies (node_type:E) with lastname = name BTW: I would assume that the following query is also equivalent, but haven't tested it yet: start c=(typeNameIndex,`node_type:C and node_name:name`), e=(typeIndex,node_type,E) match(c)--(e) return c,e ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unexpected error
Ah! Got it. That makes sense, and that most definitely is an EXTREME edge case!!! ;-) -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Mattias Persson Sent: Tuesday, June 28, 2011 8:23 AM To: Neo4j user discussions Subject: Re: [Neo4j] Unexpected error I think what Michael is saying is that you normally don't have many key/value pairs associated with one node/relationship in an index. To have 250M key/value pairs indexed in one lucene document is at most a corner case and that's why the neo4j--lucene integration isn't potimized for that. 2011/6/28 Rick Bullotta rick.bullo...@thingworx.com Wow. Neo4J is optimized for keys to find certain nodes or relationships which normally are not more than a dozen. That's quite a surprise to me, and I hope it not to be the case! -Original Message- From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On Behalf Of Michael Hunger Sent: Tuesday, June 28, 2011 7:58 AM To: Neo4j user discussions Subject: Re: [Neo4j] Unexpected error Hi Massimo, still the lucene document holds an ArrayList with all fields which grows immensely as you add millions of fields. package org.apache.lucene.document; public final class Document implements java.io.Serializable { ListFieldable fields = new ArrayListFieldable(); } So perhaps the difference is that in Neo4j we have one Document per node/relationship, where all keys + values are added. Which builds up those large documents. It is unusual for Neo4j to have a single document that contains that many entries as you normally just index the keys to find certain nodes or relationships which normally are not more than a dozen. And that's why the neo4j lucene index implementation is and will be optimized for exactly this case. So I'd suggest as Mattias said you create your own datasource and handle the adding there (obviously just adding node-ids + hashes to an arbitrary lucene index. (with one doc per node-id (or hash). Cheers Michael Am 28.06.2011 um 10:21 schrieb Massimo Lusetti: On Mon, Jun 27, 2011 at 11:56 PM, Michael Hunger michael.hun...@neotechnology.com wrote: Massimo, could you please look into the Lucene Document instance that you add all the fields to? You're right... I add only the NodeId and my own hash... Which fields do you add? If it also contains this ultralarge ArrayList with all the Fields ? As I said It only contains the Fields relative to the NodeId and the Hash And which version of lucene did you use for your standalone testing? I use 3.1.0. BTW I'm testing resin and even couchdb for the index part but I don't like it that much cause that index phase will be out of the node4j Transaction and I want to isolate all that operations in a Tranaction. Have you hint for me on how to extend the node4j Transaction... is that extensible? Thanks -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Unexpected error
On Tue, Jun 28, 2011 at 2:22 PM, Mattias Persson matt...@neotechnology.com wrote: I think what Michael is saying is that you normally don't have many key/value pairs associated with one node/relationship in an index. To have 250M key/value pairs indexed in one lucene document is at most a corner case and that's why the neo4j--lucene integration isn't potimized for that. I completely agree with all of you that this is an edge case, even for Lucene itself maybe but I need to now if a hash is present in the db be it in an index or a node property or something else so may I ask which should be the neo4j-best-optimized way to address this problem? BTW I'm still experimenting with my own DataSource... And let you know... Thanks a lot for all your support -- Massimo http://meridio.blogspot.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Problems building neo4j-rdf module
Hi all, I wanted to try out neo4j-rdf library and found somewhere that there are no official releases, but the library should be built from the source ( https://svn.neo4j.org/components/rdf/trunk). But when I checked out the project, it reported dependency problems as some of the dependencies are not available. After I changed them to the ones available from the Maven Central, then I got compilation errors. Did anyone face with the same problem and knows how to resolve this? Or, better would be if somebody could provide me with builded jar. Thanks a lot for the help! Best, Nikola Milikic Nikola Milikic, BSc Teaching Assistant University of Belgrade, Serbia email: nikola.mili...@gmail.com URL: nikola.milikic.info ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Problems building neo4j-rdf module
Another option could be to run it through the Tinkerpop stack and get access to a Sail with neo4j underneath that way. I think it's more up to date. https://github.com/tinkerpop/blueprints/wiki/Sail-Implementation 2011/6/28 Nikola Milikic nikola.mili...@gmail.com Hi all, I wanted to try out neo4j-rdf library and found somewhere that there are no official releases, but the library should be built from the source ( https://svn.neo4j.org/components/rdf/trunk). But when I checked out the project, it reported dependency problems as some of the dependencies are not available. After I changed them to the ones available from the Maven Central, then I got compilation errors. Did anyone face with the same problem and knows how to resolve this? Or, better would be if somebody could provide me with builded jar. Thanks a lot for the help! Best, Nikola Milikic Nikola Milikic, BSc Teaching Assistant University of Belgrade, Serbia email: nikola.mili...@gmail.com URL: nikola.milikic.info ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] numericRange vs. exact/fulltext index
Hi, I'm playing around with indexing and numeric range queries according to this documentation: http://docs.neo4j.org/chunked/snapshot/indexing-lucene-extras.html According to my tests numeric range queries (QueryContext.numericRange()) only have effect when exact type index is used. I tried this: Transaction tx = graphDb.beginTx(); try { IndexNode exactIndex = graphDb.index().forNodes(exactIndex, MapUtil.stringMap( IndexManager.PROVIDER, lucene, type, exact )); IndexNode fulltextIndex = graphDb.index().forNodes(fulltextIndex, MapUtil.stringMap( IndexManager.PROVIDER, lucene, type, fulltext )); Node n1 = graphDb.createNode(); n1.setProperty(foo, 5); exactIndex.add(n1, foo, ValueContext.numeric(5)); fulltextIndex.add(n1, foo, ValueContext.numeric(5)); Node n2 = graphDb.createNode(); n2.setProperty(foo, 25); exactIndex.add(n2, foo, ValueContext.numeric(25)); fulltextIndex.add(n2, foo, ValueContext.numeric(25)); // Force commit tx.success(); tx.finish(); tx = graphDb.beginTx(); //Search exact QueryContext qctx = QueryContext.numericRange(foo, 3, 25); IndexHitsNode hits = exactIndex.query(qctx); IteratorNode it = hits.iterator(); while (it.hasNext()) { Node n = it.next(); System.out.println(Found foo in exact: +n+: +n.getProperty(foo)); } assertEquals(2, hits.size()); //Search fulltext qctx = QueryContext.numericRange(foo, 3, 25); hits = fulltextIndex.query(qctx); it = hits.iterator(); while (it.hasNext()) { Node n = it.next(); System.out.println(Found foo in fulltext: +n+: +n.getProperty(foo)); } assertEquals(2, hits.size()); tx.success(); } finally { tx.finish(); } For the exact configured index the range query returns two nodes, while in fulltext configured index I get no result. Is there a way to use numeric range queries with fulltext indexes? Thanks for any hints, --- balazs ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Announcing the latest milestone (1.4.M05)
Hello graphistas, Today we’re releasing the fifth and final milestone in our 1.4 “Kiruna Stol” family. We’ve expanded our feature set to include Auto Indexing and paged traversers for the REST API, the Cypher query language has seen some major improvements and as always, we’ve squeezed more performance out of our database engine. Auto indexing -- In this milestone we have included an improved version of the auto indexing functionality that was announced shortly after 1.4.M04 and has been available in development snapshots since then. You’ll now find new configuration options for separately enabling auto indexing for node and relationship properties and for defining which properties will be indexed. For example, if you want to auto-index all node properties called “name” and all relationship properties called “since” the proper configuration is: MapString, String config = new HashMapString, String(); config.put(Config.NODE_AUTO_INDEXING, “true”); config.put(Config.NODE_KEYS_INDEXABLE, “name”); config.put(Config.RELATIONSHIP_AUTO_INDEXING, “true”); config.put(Config.RELATIONSHIP_KEYS_INDEXABLE, “since”); Passing the above to the GraphDatabaseService constructor will enable auto indexing for matching nodes and relationships, and on every commit the auto index will be updated automatically. For more details, check out the javadocs and the examples in the manual available at: http://docs.neo4j.org/chunked/1.4.M05/auto-indexing.html Paged REST Traversers After including batch operations in the previous milestone, now we also provide the option to page results of traversals via a special URI contained in Node representations and that is similar to the existing Traverser REST API. You can define the page size and lease time, having this way finer control the retrieval of traverser results from the client (and also help improve performance on the server). Cypher improvements - The newly introduced Cypher query language is growing more sophisticated and in this milestone we’ve added aggregates, ordering and limits. This allows for more expressive queries, making the following a valid statement against the cineasts database: START user=(User,login,'micha') MATCH (user)-[:FRIEND]-(friend)-[r,:RATED]-(movie) RETURN movie.title, AVG(r.stars), COUNT(*) ORDER BY AVG(r.stars) DESC, COUNT(*) DESC limit 7 To see Cypher in action, check out the screencasthttp://neo4j.vidcaster.com/U2Y/introduction-to-cypher/by our own Michael Hunger. Almost there Of course that is not all. As always, we have bug fixes, performance improvements and usability enhancements, the most prevalent of which is the removal of YAJSW as the wrapper and service installer, which should bring joy to the mac users among us. With the GA release to follow shortly, we’d like you to download, try out and provide us with your valuable feedback on these new features so that we can deliver the best possible 1.4 to you, our community. For more details and links go to the release announcement herehttp://blog.neo4j.org/2011/06/neo4j-14-m05-kiruna-stol-midsummer.html . Andrés Taylor ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Deep search with Cypher Query Language
On Tue, Jun 28, 2011 at 1:27 PM, Adrian Stabiszewski mynewslet...@nitegate.de wrote: Thanks for your answers. The correct quotation marks are working. Couldn't find this in the docs. It's under the return statement. I'll make it clearer. Thanks for the pointer. It is not possible now. It is however something that we want to have. We're closing in on the next stable release, and variable length connections are not going to make it into 1.4. It should be available soon after though, if nothing shakes the plan as we now know it. This would be great. Will it also be possible to retrieve the path? Say all nodes between c and e? I'm asking because since I don't know how may relationships are between the nodes, it is not possible to give them identifiers. Well, it's not clear how we will solve it. But yes, we have to make it possible to return and query on the content of the path. There are reasons why we have chosen not to expose things like index queries in the MATCH and WHERE statement. What is it that you are trying to do? Maybe I can help you figure out a better way of doing it? Basically I thought I could improve performance in the WHERE statement if I could use indices there. Something like in the START statement. Cypher is a declarative language. That means we try to make it so that you don't have to think about how to access the data - just which data you would like. With the addition of auto indexing in 1.4, Cypher will be able to see what indexes are available, and how to construct the execution plan as efficiently as possible. So if you have an index on the node type, and an index on the name, Cypher will be able to figure out that a lucene index join is the best way to do this query. Regards, Andrés ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] numericRange vs. exact/fulltext index
Hi Balazs, I think the issue could be in lucene, with the mix of the white-space-tokenizing-analyzer and numeric values. I don't know. What I see in neo4j is that it treats the values the exact same way, the queries to the index is exactly the same, but it just doesn't return any values. I think there needs to be some more googling around this to get more answers. 2011/6/28 Balazs E. Pataki pat...@dsd.sztaki.hu Hi, I'm playing around with indexing and numeric range queries according to this documentation: http://docs.neo4j.org/chunked/snapshot/indexing-lucene-extras.html According to my tests numeric range queries (QueryContext.numericRange()) only have effect when exact type index is used. I tried this: Transaction tx = graphDb.beginTx(); try { IndexNode exactIndex = graphDb.index().forNodes(exactIndex, MapUtil.stringMap( IndexManager.PROVIDER, lucene, type, exact )); IndexNode fulltextIndex = graphDb.index().forNodes(fulltextIndex, MapUtil.stringMap( IndexManager.PROVIDER, lucene, type, fulltext )); Node n1 = graphDb.createNode(); n1.setProperty(foo, 5); exactIndex.add(n1, foo, ValueContext.numeric(5)); fulltextIndex.add(n1, foo, ValueContext.numeric(5)); Node n2 = graphDb.createNode(); n2.setProperty(foo, 25); exactIndex.add(n2, foo, ValueContext.numeric(25)); fulltextIndex.add(n2, foo, ValueContext.numeric(25)); // Force commit tx.success(); tx.finish(); tx = graphDb.beginTx(); //Search exact QueryContext qctx = QueryContext.numericRange(foo, 3, 25); IndexHitsNode hits = exactIndex.query(qctx); IteratorNode it = hits.iterator(); while (it.hasNext()) { Node n = it.next(); System.out.println(Found foo in exact: +n+: +n.getProperty(foo)); } assertEquals(2, hits.size()); //Search fulltext qctx = QueryContext.numericRange(foo, 3, 25); hits = fulltextIndex.query(qctx); it = hits.iterator(); while (it.hasNext()) { Node n = it.next(); System.out.println(Found foo in fulltext: +n+: +n.getProperty(foo)); } assertEquals(2, hits.size()); tx.success(); } finally { tx.finish(); } For the exact configured index the range query returns two nodes, while in fulltext configured index I get no result. Is there a way to use numeric range queries with fulltext indexes? Thanks for any hints, --- balazs ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] cassandra + neo4j graph
Thanks jim, Wow! a great example to show how to think while designing graph dbs. We also wanted the graph db to act as a representational form of owl database so does each node required to have a uri ? Is it wise to conform our graph db to the owl /rdf standard? We require this so that we can easily map the graph db to the linked ontology databases like dbpedia, freebase etc .in short how to make the graph db semantic web ready and easily linkable to external web ontologies? On 6/28/11, Jim Webber j...@neotechnology.com wrote: Hey Aliabbas, It's unlikely that our store will be a good place for video - we're optimised around fast relationship traversal rather than big blobs. I'd recommend just hosting their (relative) URIs in Neo4j and exposing the files out on to the Web, hosted on the filesystem or in something like Riak which is optimised around opaque KV storage and retrieval. In terms of conversations between users - why not just model them explicitly. A--PARTICIPATED_IN(since: 2011-03-03)--Conversation1 B--PARTICIPATED_IN((since: 2011-03-03)--Conversation1 C--PARTICIPATED_IN((since: 2011-04-04)--Conversation1 Conversation1--FIRST_MESSAGE--Message1 Message1--NEXT--Message2 Message2--NEXT--Message3 Message1--SENT_BY--A Message12--SENT_BY--B Etc. Basically you really draw out the entities at the heart of your domain. The only gotcha I can think of here is if you have a Britney Spears moment where there is a rapid conversation meaning the latest MessageX node might become contended. But if your system has celebrity chat that's probably going to involve different application logic (e.g. moderation) anyway. Jim ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user -- Aliabbas Petiwala M.Tech CSE ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Knowing the status of a transaction at the call to finish()
Is there an easy way to know if the transaction used in a call to finish() is in a success or failure state? ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] neo4j-graph-collections
A couple of weeks ago Peter Neubauer set up a repository for in-graph datastructures: https://github.com/peterneubauer/graph-collections. At this time of writing only the Btree/Timeline index is part of this component. In my opinion it would be interesting to move the Rtree parts of neo-spatial to neo4j-graph-collections too. I looked at the code but don't feel competent to seperate out those classes that support generic Rtrees from those classes that are clearly spatial related. Is there any enthusiasm for such a project and if so, who is willing and able to do this? Niels ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] numericRange vs. exact/fulltext index
Hi Mattias, Thanks for the tip! I started to look around and I think I found something. When fulltext type index is created its type will be CustomType (subclass of IndexType - IndexType is used for exact indexes) in neo4j. CustomType overrides the addToDocument() of IndexType method, which is the function that actually created a Lucene field. IndexType's looks like this: public void addToDocument( Document document, String key, Object value ) { document.add( instantiateField( key, value, Index.NOT_ANALYZED ) ); } CustomType's implementation on teh other hand: @Override public void addToDocument( Document document, String key, Object value ) { document.add( new Field( exactKey( key ), value.toString(), Store.YES, Index.NOT_ANALYZED ) ); document.add( instantiateField( key, value.toString(), Index.ANALYZED ) ); } What I can see here is that CustomType's version explicitely converts value to a String and therefore instantiateField won't detect it as a number and will not create a NumericField for it. Could this be the root of the problem? I just replaced 'value.toString()' with 'value', and now my test runs OK (and fulltext search for terms still work beside numeric range queries). Regards, --- balazs On 6/28/11 4:41 PM, Mattias Persson wrote: Hi Balazs, I think the issue could be in lucene, with the mix of the white-space-tokenizing-analyzer and numeric values. I don't know. What I see in neo4j is that it treats the values the exact same way, the queries to the index is exactly the same, but it just doesn't return any values. I think there needs to be some more googling around this to get more answers. 2011/6/28 Balazs E. Patakipat...@dsd.sztaki.hu Hi, I'm playing around with indexing and numeric range queries according to this documentation: http://docs.neo4j.org/chunked/snapshot/indexing-lucene-extras.html According to my tests numeric range queries (QueryContext.numericRange()) only have effect when exact type index is used. I tried this: Transaction tx = graphDb.beginTx(); try { IndexNode exactIndex = graphDb.index().forNodes(exactIndex, MapUtil.stringMap( IndexManager.PROVIDER, lucene, type, exact )); IndexNode fulltextIndex = graphDb.index().forNodes(fulltextIndex, MapUtil.stringMap( IndexManager.PROVIDER, lucene, type, fulltext )); Node n1 = graphDb.createNode(); n1.setProperty(foo, 5); exactIndex.add(n1, foo, ValueContext.numeric(5)); fulltextIndex.add(n1, foo, ValueContext.numeric(5)); Node n2 = graphDb.createNode(); n2.setProperty(foo, 25); exactIndex.add(n2, foo, ValueContext.numeric(25)); fulltextIndex.add(n2, foo, ValueContext.numeric(25)); // Force commit tx.success(); tx.finish(); tx = graphDb.beginTx(); //Search exact QueryContext qctx = QueryContext.numericRange(foo, 3, 25); IndexHitsNode hits = exactIndex.query(qctx); IteratorNode it = hits.iterator(); while (it.hasNext()) { Node n = it.next(); System.out.println(Found foo in exact: +n+: +n.getProperty(foo)); } assertEquals(2, hits.size()); //Search fulltext qctx = QueryContext.numericRange(foo, 3, 25); hits = fulltextIndex.query(qctx); it = hits.iterator(); while (it.hasNext()) { Node n = it.next(); System.out.println(Found foo in fulltext: +n+: +n.getProperty(foo)); } assertEquals(2, hits.size()); tx.success(); } finally { tx.finish(); } For the exact configured index the range query returns two nodes, while in fulltext configured index I get no result. Is there a way to use numeric range queries with fulltext indexes? Thanks for any hints, --- balazs ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
[Neo4j] Advantages of EmbeddedReadOnlyGraphDatabase ? [was NonWritableChannelException]
Are there advantages in accessing the database via the EmbeddedReadOnlyGraphDatabaseclass in a read-only application? A week or so back I posted the message below regarding a problem experienced while using EmbeddedReadOnlyGraphDatabase that regrettably didn't solicit any responses and since then I've been using the standard read-write EmbeddedGraphDatabase without repeat of the same issue even though my application is read-only. Are there any avoidable performance penalties using EmbeddedGraphDatabase in place of EmbeddedReadOnlyGraphDatabase? Along a similar lines, as my application is read-only, I'm not doing any explicit transaction management - is there any reason why I should? Begin forwarded message: From: Paul Bandler pband...@cseuk.co.uk Date: 21 June 2011 12:22:56 GMT+01:00 To: Neo4j user discussions user@lists.neo4j.org Subject: [Neo4j] NonWritableChannelException Reply-To: Neo4j user discussions user@lists.neo4j.org The above exception is thrown from the call stack indicated below while traversing a neo4j graph using the EmbededReadOnly database. Using 1.4M04. The application is running with 1gb of heap with defaulting all other parameters except cache_type=weak on windows. I found some reports of this exception being thrown at shutdown back in January but this is not happening at shutdown and I could find no posted resolution of that thread anyway. Can anyone suggest what the cause if this exception is? Thanks Paul Exception in thread main java.nio.channels.NonWritableChannelException at sun.nio.ch.FileChannelImpl.write(Unknown Source) at org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:104) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.refreshBricks(PersistenceWindowPool.java:536) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.acquire(PersistenceWindowPool.java:128) at org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.acquireWindow(CommonAbstractStore.java:526) at org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:327) at org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114) at org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97) at org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108) at org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603) at org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:399) at org.neo4j.kernel.impl.core.IntArrayIterator.hasNext(IntArrayIterator.java:93) at org.neo4j.kernel.impl.core.NodeImpl.getSingleRelationship(NodeImpl.java:218) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Advantages of EmbeddedReadOnlyGraphDatabase ? [was NonWritableChannelException]
The problem resulting in the NonWritableChannelException occurred on Windows although I need to run on Solaris as well as Windows. Actually I must apologise for saying that the previously reported issue didn't solicit a response - I see that Johan Svensson did just today and suggests it might be fixed in the new milestone release. My questions regarding what actual effect using the EmbeddedReadOnlyGraphDatabase is still relevant however...? On 28 Jun 2011, at 21:21, Rick Bullotta wrote: Paul, are you on windows or Linux? - Reply message - From: Paul Bandler pband...@cseuk.co.uk Date: Tue, Jun 28, 2011 1:34 pm Subject: [Neo4j] Advantages of EmbeddedReadOnlyGraphDatabase ? [was NonWritableChannelException] To: Neo4j user discussions user@lists.neo4j.org Are there advantages in accessing the database via the EmbeddedReadOnlyGraphDatabaseclass in a read-only application? A week or so back I posted the message below regarding a problem experienced while using EmbeddedReadOnlyGraphDatabase that regrettably didn't solicit any responses and since then I've been using the standard read-write EmbeddedGraphDatabase without repeat of the same issue even though my application is read-only. Are there any avoidable performance penalties using EmbeddedGraphDatabase in place of EmbeddedReadOnlyGraphDatabase? Along a similar lines, as my application is read-only, I'm not doing any explicit transaction management - is there any reason why I should? Begin forwarded message: From: Paul Bandler pband...@cseuk.co.uk Date: 21 June 2011 12:22:56 GMT+01:00 To: Neo4j user discussions user@lists.neo4j.org Subject: [Neo4j] NonWritableChannelException Reply-To: Neo4j user discussions user@lists.neo4j.org The above exception is thrown from the call stack indicated below while traversing a neo4j graph using the EmbededReadOnly database. Using 1.4M04. The application is running with 1gb of heap with defaulting all other parameters except cache_type=weak on windows. I found some reports of this exception being thrown at shutdown back in January but this is not happening at shutdown and I could find no posted resolution of that thread anyway. Can anyone suggest what the cause if this exception is? Thanks Paul Exception in thread main java.nio.channels.NonWritableChannelException at sun.nio.ch.FileChannelImpl.write(Unknown Source) at org.neo4j.kernel.impl.nioneo.store.AbstractPersistenceWindow.writeOut(AbstractPersistenceWindow.java:104) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.refreshBricks(PersistenceWindowPool.java:536) at org.neo4j.kernel.impl.nioneo.store.PersistenceWindowPool.acquire(PersistenceWindowPool.java:128) at org.neo4j.kernel.impl.nioneo.store.CommonAbstractStore.acquireWindow(CommonAbstractStore.java:526) at org.neo4j.kernel.impl.nioneo.store.RelationshipStore.getChainRecord(RelationshipStore.java:327) at org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:114) at org.neo4j.kernel.impl.nioneo.xa.ReadTransaction.getMoreRelationships(ReadTransaction.java:97) at org.neo4j.kernel.impl.persistence.PersistenceManager.getMoreRelationships(PersistenceManager.java:108) at org.neo4j.kernel.impl.core.NodeManager.getMoreRelationships(NodeManager.java:603) at org.neo4j.kernel.impl.core.NodeImpl.getMoreRelationships(NodeImpl.java:399) at org.neo4j.kernel.impl.core.IntArrayIterator.hasNext(IntArrayIterator.java:93) at org.neo4j.kernel.impl.core.NodeImpl.getSingleRelationship(NodeImpl.java:218) ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j-graph-collections
The RTree in principle should be generalizable, but the current implementation in neo4j-spatial does make a few assumptions specific to spatial data, and makes use of spatial envelopes for the tree node bounding boxes. It is also specific to 2D. We could make a few improvements first, like generalizing to n-dimensions, replacing the recursive search with a traverser and generalizing the bounding boxes to be simple double-arrays. Then the only thing left would be to decide if it is ok for it to be based on n-dim doubles or should be generalized to more types. On Tue, Jun 28, 2011 at 11:14 PM, Saikat Kanjilal sxk1...@hotmail.comwrote: I would be interested in helping out with this, let me know next steps. Sent from my iPhone On Jun 28, 2011, at 8:49 AM, Niels Hoogeveen pd_aficion...@hotmail.com wrote: A couple of weeks ago Peter Neubauer set up a repository for in-graph datastructures: https://github.com/peterneubauer/graph-collections. At this time of writing only the Btree/Timeline index is part of this component. In my opinion it would be interesting to move the Rtree parts of neo-spatial to neo4j-graph-collections too. I looked at the code but don't feel competent to seperate out those classes that support generic Rtrees from those classes that are clearly spatial related. Is there any enthusiasm for such a project and if so, who is willing and able to do this? Niels ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j-graph-collections
Peter would have to grant you rights to his repo and I bet he will have some ideas of his own to add to my suggestions. You would need to flesh out what parts of neo4j-spatial are actually generic Rtree classes (making sure there are no dependencies to geotools). It would be nice if the Rtree classes ending up in neo4j-collections would really be a multi-dimensional index component that is independent of its usage as an index for geographical information, so it can be used for other multi-dimensional search actions that are not necessarily geographical in nature. Together with the people responsible for the Lucene index component we have to find a common way to access the Rtree and the Btree index, so it can all eventually become part of the indexing framework, but i'd consider that step 2. Niels From: sxk1...@hotmail.com Date: Tue, 28 Jun 2011 14:14:04 -0700 To: user@lists.neo4j.org Subject: Re: [Neo4j] neo4j-graph-collections I would be interested in helping out with this, let me know next steps. Sent from my iPhone On Jun 28, 2011, at 8:49 AM, Niels Hoogeveen pd_aficion...@hotmail.com wrote: A couple of weeks ago Peter Neubauer set up a repository for in-graph datastructures: https://github.com/peterneubauer/graph-collections. At this time of writing only the Btree/Timeline index is part of this component. In my opinion it would be interesting to move the Rtree parts of neo-spatial to neo4j-graph-collections too. I looked at the code but don't feel competent to seperate out those classes that support generic Rtrees from those classes that are clearly spatial related. Is there any enthusiasm for such a project and if so, who is willing and able to do this? Niels ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j-graph-collections
Craig, Sounds like a good plan. Would you be able to make the Rtree implentation spatial-independent based on the suggestions you make? Then we can move those classes to neo4j-graph-collections. This makes neo4j-spatial dependent on neo4j-graph-collections, though that component has no other dependencies than neo4j-kernel. Once we have fleshed out the Rtree as spatial independent and placed in neo4j-graph-collections, we can start working to integrate the index into the current indexing framework. Note to Peter. If we pursue this road, neo4j-graph-collections will have to become an official component and can no longer stay personal Git repo. Niels Date: Wed, 29 Jun 2011 00:32:15 +0200 From: cr...@amanzi.com To: user@lists.neo4j.org Subject: Re: [Neo4j] neo4j-graph-collections The RTree in principle should be generalizable, but the current implementation in neo4j-spatial does make a few assumptions specific to spatial data, and makes use of spatial envelopes for the tree node bounding boxes. It is also specific to 2D. We could make a few improvements first, like generalizing to n-dimensions, replacing the recursive search with a traverser and generalizing the bounding boxes to be simple double-arrays. Then the only thing left would be to decide if it is ok for it to be based on n-dim doubles or should be generalized to more types. On Tue, Jun 28, 2011 at 11:14 PM, Saikat Kanjilal sxk1...@hotmail.comwrote: I would be interested in helping out with this, let me know next steps. Sent from my iPhone On Jun 28, 2011, at 8:49 AM, Niels Hoogeveen pd_aficion...@hotmail.com wrote: A couple of weeks ago Peter Neubauer set up a repository for in-graph datastructures: https://github.com/peterneubauer/graph-collections. At this time of writing only the Btree/Timeline index is part of this component. In my opinion it would be interesting to move the Rtree parts of neo-spatial to neo4j-graph-collections too. I looked at the code but don't feel competent to seperate out those classes that support generic Rtrees from those classes that are clearly spatial related. Is there any enthusiasm for such a project and if so, who is willing and able to do this? Niels ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j-graph-collections
As to the issue of n-dim doubles, it would be interesting to consider creating a set of classes of type Orderable (supporting , =, , = operations), this we can use in both Rtree and Btree. Right now Btree only supports datatype Long. This should also become more generic. A first step we can take is at least wrap the common datatypes in Orderable classes. Niels Date: Wed, 29 Jun 2011 00:32:15 +0200 From: cr...@amanzi.com To: user@lists.neo4j.org Subject: Re: [Neo4j] neo4j-graph-collections The RTree in principle should be generalizable, but the current implementation in neo4j-spatial does make a few assumptions specific to spatial data, and makes use of spatial envelopes for the tree node bounding boxes. It is also specific to 2D. We could make a few improvements first, like generalizing to n-dimensions, replacing the recursive search with a traverser and generalizing the bounding boxes to be simple double-arrays. Then the only thing left would be to decide if it is ok for it to be based on n-dim doubles or should be generalized to more types. On Tue, Jun 28, 2011 at 11:14 PM, Saikat Kanjilal sxk1...@hotmail.comwrote: I would be interested in helping out with this, let me know next steps. Sent from my iPhone On Jun 28, 2011, at 8:49 AM, Niels Hoogeveen pd_aficion...@hotmail.com wrote: A couple of weeks ago Peter Neubauer set up a repository for in-graph datastructures: https://github.com/peterneubauer/graph-collections. At this time of writing only the Btree/Timeline index is part of this component. In my opinion it would be interesting to move the Rtree parts of neo-spatial to neo4j-graph-collections too. I looked at the code but don't feel competent to seperate out those classes that support generic Rtrees from those classes that are clearly spatial related. Is there any enthusiasm for such a project and if so, who is willing and able to do this? Niels ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Auto Indexing for Neo4j
Peter, Did this get done before the feature freeze? I'm still trying to find a way to query/configure an autoindex via REST. -- Matt Luongo Co-Founder, Scholr.ly On Tue, Jun 14, 2011 at 5:32 PM, Peter Neubauer peter.neuba...@neotechnology.com wrote: Yes, configuration and indexing via REST is the next step for this. Cheers, /peter neubauer GTalk: neubauer.peter Skype peter.neubauer Phone +46 704 106975 LinkedIn http://www.linkedin.com/in/neubauer Twitter http://twitter.com/peterneubauer http://www.neo4j.org - Your high performance graph database. http://startupbootcamp.org/- Öresund - Innovation happens HERE. http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party. On Tue, Jun 14, 2011 at 7:25 PM, Aseem Kishore aseem.kish...@gmail.com wrote: Awesome to hear, and great work! Will we be able to configure+use this from the REST API? Cheers, Aseem On Tue, Jun 14, 2011 at 8:30 AM, Chris Gioran chris.gio...@neotechnology.com wrote: Good news everyone, A request that's often come up on the mailing list is a mechanism for automatically indexing properties of nodes and relationships. As of today's SNAPSHOT, auto-indexing is part of Neo4j which means nodes and relationships can now be indexed based on convention, requiring far less effort and code from the developer's point of view. Getting hold of an automatic index is straightforward: AutoIndexerNode nodeAutoIndexer = graphDb.index().getNodeAutoIndexer(); AutoIndexNode nodeAutoIndex = nodeAutoIndexer.getAutoIndex(); Once you've got an instance of AutoIndex, you can use it as a read-only IndexNode. The AutoIndexer interface also supports runtime changes and enabling/disabling the auto indexing functionality. To support the new features, there are new Config options you can pass to the startup configuration map in EmbeddedGraphDatabase, the most important of which are: Config.NODE_AUTO_INDEXING (defaults to false) Config.RELATIONSHIP_AUTO_INDEXING (defaults to false) If set to true (independently of each other) these properties will enable auto indexing functionality and at the successful finish() of each transaction, all newly added properties on the primitives for which auto indexing is enabled will be added to a special AutoIndex (and deleted or changed properties will be updated accordingly too). There are options for fine grained control to determine properties are indexed, default behaviors and so forth. For example, by default all properties are indexed. If you want only properties name and age for Nodes and since and until for Relationships to be auto indexed, simply set the initial configuration as follows: Config.NODE_KEYS_INDEXABLE = name, age; Config.RELATIONSHIP_KEYS_INDEXABLE=since, until; For the semantics of the auto-indexing operations, constraints and more detailed examples, see the documentation available at http://docs.neo4j.org/chunked/1.4-SNAPSHOT/auto-indexing.html We're pretty excited about this feature since we think it'll make your lives as developers much more productive in a range of use-cases. If you're comfortable with using SNAPSHOT versions of Neo4j, please try it out and let us know what you think - we'd really value your feedback. If you're happier with using packaged milestones then this feature will be available from 1.4 M05 in a couple of weeks from now. ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] neo4j-graph-collections
I've read through this thread in more detail and have a few thoughts, when you talk about type I am assuming that you are referring to an interface that both (Btree,Rtree) can implement, for the data types I'd like to understand the use cases first before implementing the different data types, maybe we could store types of Object instead of Long or Double and implement comparators in a more meaningful fashion. Also I was wondering if unit tests would need to be extracted out of the spatial component and embedded inside the graph-collections component as well or whether we'd potentially need to write brand new unit tests as well. Craig as I mentioned I'd love to help, let me know if it would be possible to fork a repo or to talk in more detail this week. Regards From: pd_aficion...@hotmail.com To: user@lists.neo4j.org Date: Wed, 29 Jun 2011 01:35:43 +0200 Subject: Re: [Neo4j] neo4j-graph-collections As to the issue of n-dim doubles, it would be interesting to consider creating a set of classes of type Orderable (supporting , =, , = operations), this we can use in both Rtree and Btree. Right now Btree only supports datatype Long. This should also become more generic. A first step we can take is at least wrap the common datatypes in Orderable classes. Niels Date: Wed, 29 Jun 2011 00:32:15 +0200 From: cr...@amanzi.com To: user@lists.neo4j.org Subject: Re: [Neo4j] neo4j-graph-collections The RTree in principle should be generalizable, but the current implementation in neo4j-spatial does make a few assumptions specific to spatial data, and makes use of spatial envelopes for the tree node bounding boxes. It is also specific to 2D. We could make a few improvements first, like generalizing to n-dimensions, replacing the recursive search with a traverser and generalizing the bounding boxes to be simple double-arrays. Then the only thing left would be to decide if it is ok for it to be based on n-dim doubles or should be generalized to more types. On Tue, Jun 28, 2011 at 11:14 PM, Saikat Kanjilal sxk1...@hotmail.comwrote: I would be interested in helping out with this, let me know next steps. Sent from my iPhone On Jun 28, 2011, at 8:49 AM, Niels Hoogeveen pd_aficion...@hotmail.com wrote: A couple of weeks ago Peter Neubauer set up a repository for in-graph datastructures: https://github.com/peterneubauer/graph-collections. At this time of writing only the Btree/Timeline index is part of this component. In my opinion it would be interesting to move the Rtree parts of neo-spatial to neo4j-graph-collections too. I looked at the code but don't feel competent to seperate out those classes that support generic Rtrees from those classes that are clearly spatial related. Is there any enthusiasm for such a project and if so, who is willing and able to do this? Niels ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] numericRange vs. exact/fulltext index
Wow, thank you for finding that. Well done! I'll fix it and if it doesn't break anything else then I'll commit it. Best, Mattias Den tisdagen den 28:e juni 2011 skrev Balazs E. Patakipat...@dsd.sztaki.hu: Hi Mattias, Thanks for the tip! I started to look around and I think I found something. When fulltext type index is created its type will be CustomType (subclass of IndexType - IndexType is used for exact indexes) in neo4j. CustomType overrides the addToDocument() of IndexType method, which is the function that actually created a Lucene field. IndexType's looks like this: public void addToDocument( Document document, String key, Object value ) { document.add( instantiateField( key, value, Index.NOT_ANALYZED ) ); } CustomType's implementation on teh other hand: @Override public void addToDocument( Document document, String key, Object value ) { document.add( new Field( exactKey( key ), value.toString(), Store.YES, Index.NOT_ANALYZED ) ); document.add( instantiateField( key, value.toString(), Index.ANALYZED ) ); } What I can see here is that CustomType's version explicitely converts value to a String and therefore instantiateField won't detect it as a number and will not create a NumericField for it. Could this be the root of the problem? I just replaced 'value.toString()' with 'value', and now my test runs OK (and fulltext search for terms still work beside numeric range queries). Regards, --- balazs On 6/28/11 4:41 PM, Mattias Persson wrote: Hi Balazs, I think the issue could be in lucene, with the mix of the white-space-tokenizing-analyzer and numeric values. I don't know. What I see in neo4j is that it treats the values the exact same way, the queries to the index is exactly the same, but it just doesn't return any values. I think there needs to be some more googling around this to get more answers. 2011/6/28 Balazs E. Patakipat...@dsd.sztaki.hu Hi, I'm playing around with indexing and numeric range queries according to this documentation: http://docs.neo4j.org/chunked/snapshot/indexing-lucene-extras.html According to my tests numeric range queries (QueryContext.numericRange()) only have effect when exact type index is used. I tried this: Transaction tx = graphDb.beginTx(); try { IndexNode exactIndex = graphDb.index().forNodes(exactIndex, MapUtil.stringMap( IndexManager.PROVIDER, lucene, type, exact )); IndexNode fulltextIndex = graphDb.index().forNodes(fulltextIndex, MapUtil.stringMap( IndexManager.PROVIDER, lucene, type, fulltext )); Node n1 = graphDb.createNode(); n1.setProperty(foo, 5); exactIndex.add(n1, foo, ValueContext.numeric(5)); fulltextIndex.add(n1, foo, ValueContext.numeric(5)); Node n2 = graphDb.createNode(); n2.setProperty(foo, 25); exactIndex.add(n2, foo, ValueContext.numeric(25)); fulltextIndex.add(n2, foo, ValueContext.numeric(25)); // Force commit tx.success(); tx.finish(); tx = graphDb.beginTx(); //Search exact QueryContext qctx = QueryContext.numericRange(foo, 3, 25); IndexHitsNode hits = exactIndex.query(qctx); IteratorNode it = hits.iterator(); while (it.hasNext()) { Node n = it.next(); System.out.println(Found foo in exact: +n+: +n.getProperty(foo)); } assertEquals(2, hits.size()); //Search fulltext qctx = QueryContext.numericRange(foo, 3, 25); hits = fulltextIndex.query(qctx); it = hits.iterator(); while (it.hasNext()) { Node n = it.next(); System.out.println(Found foo in fulltext: +n+: +n.getProperty(foo)); } assertEquals(2, hits.size()); tx.success(); } finally { tx.finish(); } For the exact configured index the range query returns two nodes, while in fulltext configured index I get no result. Is there a way to use numeric range queries with fulltext indexes? Thanks for any hints, --- balazs ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list -- Mattias Persson, [matt...@neotechnology.com] Hacker, Neo Technology www.neotechnology.com ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user
Re: [Neo4j] Announcing the latest milestone (1.4.M05)
Awesome stuff! One question: is there any ability yet to use (i.e. configure) auto-indexing from the REST API? If not, will that be a part of 1.4 final? Cheers, Aseem On Tue, Jun 28, 2011 at 7:03 AM, Andres Taylor andres.tay...@neotechnology.com wrote: Hello graphistas, Today we’re releasing the fifth and final milestone in our 1.4 “Kiruna Stol” family. We’ve expanded our feature set to include Auto Indexing and paged traversers for the REST API, the Cypher query language has seen some major improvements and as always, we’ve squeezed more performance out of our database engine. Auto indexing -- In this milestone we have included an improved version of the auto indexing functionality that was announced shortly after 1.4.M04 and has been available in development snapshots since then. You’ll now find new configuration options for separately enabling auto indexing for node and relationship properties and for defining which properties will be indexed. For example, if you want to auto-index all node properties called “name” and all relationship properties called “since” the proper configuration is: MapString, String config = new HashMapString, String(); config.put(Config.NODE_AUTO_INDEXING, “true”); config.put(Config.NODE_KEYS_INDEXABLE, “name”); config.put(Config.RELATIONSHIP_AUTO_INDEXING, “true”); config.put(Config.RELATIONSHIP_KEYS_INDEXABLE, “since”); Passing the above to the GraphDatabaseService constructor will enable auto indexing for matching nodes and relationships, and on every commit the auto index will be updated automatically. For more details, check out the javadocs and the examples in the manual available at: http://docs.neo4j.org/chunked/1.4.M05/auto-indexing.html Paged REST Traversers After including batch operations in the previous milestone, now we also provide the option to page results of traversals via a special URI contained in Node representations and that is similar to the existing Traverser REST API. You can define the page size and lease time, having this way finer control the retrieval of traverser results from the client (and also help improve performance on the server). Cypher improvements - The newly introduced Cypher query language is growing more sophisticated and in this milestone we’ve added aggregates, ordering and limits. This allows for more expressive queries, making the following a valid statement against the cineasts database: START user=(User,login,'micha') MATCH (user)-[:FRIEND]-(friend)-[r,:RATED]-(movie) RETURN movie.title, AVG(r.stars), COUNT(*) ORDER BY AVG(r.stars) DESC, COUNT(*) DESC limit 7 To see Cypher in action, check out the screencasthttp://neo4j.vidcaster.com/U2Y/introduction-to-cypher/by our own Michael Hunger. Almost there Of course that is not all. As always, we have bug fixes, performance improvements and usability enhancements, the most prevalent of which is the removal of YAJSW as the wrapper and service installer, which should bring joy to the mac users among us. With the GA release to follow shortly, we’d like you to download, try out and provide us with your valuable feedback on these new features so that we can deliver the best possible 1.4 to you, our community. For more details and links go to the release announcement herehttp://blog.neo4j.org/2011/06/neo4j-14-m05-kiruna-stol-midsummer.html . Andrés Taylor ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user ___ Neo4j mailing list User@lists.neo4j.org https://lists.neo4j.org/mailman/listinfo/user