Response to Questions: Hi Michael and thanks for the reply, I tried your suggestionen but the return is empty. If I change the direction of the last [:KNOWS] relation to be <-- I do get a result, however that is only the other owners of the numbers I have and not the friends of the owners of the numbers that I have... Graph looks like this: A KNOWS 1 B KNOWS 1 B KNOWS 3 C KNOWS 1 C KNOWS 2 C KNOWS 3
Suggest friends of A Which (we hope would) return: 3, 2 in that particular order (based on Count?) and not including 1 which already is a KNOWS connection of A. Best Regards Nami Zarringhalam CEO @TrueCaller -----Ursprungligt meddelande----- Från: [email protected] [mailto:[email protected]] För [email protected] Skickat: den 12 juli 2011 17:11 Till: [email protected] Ämne: User Digest, Vol 52, Issue 54 Send User mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit https://lists.neo4j.org/mailman/listinfo/user or, via email, send a message with subject or body 'help' to [email protected] You can reach the person managing the list at [email protected] When replying, please edit your Subject line so it is more specific than "Re: Contents of User digest..." Today's Topics: 1. Re: Problems with neo4j 1.4 rest server and filter (Ian Robinson) 2. Questions (Nami Zarringhalam) 3. Re: Questions (Michael Hunger) 4. Re: User Digest, Vol 52, Issue 53 (Josh Adell) 5. missing required jta.jar for debian? (Eddy Respondek) 6. Re: missing required jta.jar for debian? (Chris Gioran) 7. how setup lucene fulltext search filter (???) 8. Re: how setup lucene fulltext search filter (Adriano Henrique de Almeida) 9. Re: Problems with neo4j 1.4 rest server and filter (mike_t) 10. Gremlin compiler problem (mvn2) ! (Zhiguo Zhang) ---------------------------------------------------------------------- Message: 1 Date: Tue, 12 Jul 2011 13:25:41 +0100 From: Ian Robinson <[email protected]> Subject: Re: [Neo4j] Problems with neo4j 1.4 rest server and filter To: Neo4j user discussions <[email protected]> Message-ID: <CANba+_=pfhgqBzyvYoCjOOV=htw-xqrl8hqwqvgwy8aptgs...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Hi Mike The problem here is that 1.4 no longer accepts spaces in keys and values -instead, use underscores. Try: { "order" : "depth_first", "uniqueness" : "relationship", "return_filter" : { "language" : "javascript", "body" : "position.length() > 0 && position.lastRelationship().getProperty('name').toLowerCase().indexOf('test' )!=-1"}, "max_depth" : 1 } That is, "depth first" becomes "depth_first", "return filter" becomes "return_filter", and "max depth" becomes "max_depth". Kind regards ian On 12 July 2011 11:39, mike_t <[email protected]> wrote: > Hi, > I have some problems with the new version of neo4j. > > For my application i wrote a few unit test. These worked perfectly in neo4j > 1.2 and 1.3 but not in 1.4. > > For example: > I wanna have all relationships for a node with a special name. So I post > following message to the url > http://localhost:7474/db/data/node/1/traverse/relationship : > > > { "order" : "depth first", "uniqueness" : "relationship", "return filter" > : { "language" : "javascript", "body" : "position.length() > 0 && > > position.lastRelationship().getProperty('name').toLowerCase().indexOf('test' )!=-1" > }, "max depth" : 1 } > > I think neo4j ignores the filter and returns all relationships. > > > -- > View this message in context: > http://neo4j-user-list.438527.n3.nabble.com/Problems-with-neo4j-1-4-rest-ser ver-and-filter-tp3162043p3162043.html > Sent from the Neo4J User List mailing list archive at Nabble.com. > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > -- Director of Customer Success, Neo Technology http://neotechnology.com UK: +44 7974 144424 Skype: iansrobinson ------------------------------ Message: 2 Date: Tue, 12 Jul 2011 14:26:09 +0200 From: "Nami Zarringhalam" <[email protected]> Subject: [Neo4j] Questions To: <[email protected]> Message-ID: <00cf01cc408e$e1cb42f0$a561c8d0$@[email protected]> Content-Type: text/plain; charset="us-ascii" Hi guys, I have a few questions about getting started with neo4j. We have a graph with 4 ppl owning 5 phone numbers (some own 1 some own 2 and others 3). 1. When trying to get a list: friends of friends (that are not my own friends), I write the following query, however my own friends still show up and some entries are duplicates. START id_my=(11) MATCH (id_my)-[:KNOWS]->(f)<-[:KNOWS]->(id_o)-[:KNOWS]->(fof) WHERE NOT(f.number=fof.number) RETURN f a. How do I remove my own friends from the returning subset? b. How do I remove the duplicates in the returning array? c. How do I make sure they are prioritized in the right order? (maybe connected to the b. question) 2. Are there any resources where I can read more about how to use indexes? I mean very practical examples of how they are set up and used. Thank you guys! Best Regards Nami Zarringhalam CEO E-mail: <mailto:[email protected]> [email protected] URL: <http://www.truecaller.com/> www.truecaller.com Phone: +46(0)73 - 669 39 89 Skype: nami.zarringhalam --------------------------------- TrueCaller, a global phonebook, in the palm of your hand! Download for free at truecaller.com from your cellphone today! --------------------------------- This email and any attachments are the property of True Software Scandinavia AB. It is intended only for the person or entity to which it is addressed and may contain information which is confidential, privileged or otherwise protected from disclosure. Distribution or copying of this email or the information contained herein by anyone other than the intended recipient is prohibited. If you have received this email in error, please immediately notify the sender by email at <mailto:[email protected]> [email protected] and please delete and destroy any copies of this email and its attachments, if any. ------------------------------ Message: 3 Date: Tue, 12 Jul 2011 14:39:23 +0200 From: Michael Hunger <[email protected]> Subject: Re: [Neo4j] Questions To: Neo4j user discussions <[email protected]> Message-ID: <[email protected]> Content-Type: text/plain; charset=us-ascii Hi, could you please try: > START id_my=(11) MATCH (id_my)-[:KNOWS]->(f)-[:KNOWS]->(fof) RETURN fof for distinct results please use "distinct" > START id_my=(11) MATCH (id_my)-[:KNOWS]->(f)-[:KNOWS]->(fof) RETURN distinct fof I don't know what the "<-[:KNOWS]->(id_o)-[:KNOWS]->" stands for? What is the ordering of your "prioritzation"? For indexes, please look at (http://docs.neo4j.org/chunked/snapshot/indexing.html). Cheers Michael Am 12.07.2011 um 14:26 schrieb Nami Zarringhalam: > Hi guys, > > I have a few questions about getting started with neo4j. > > We have a graph with 4 ppl owning 5 phone numbers (some own 1 some own 2 and > others 3). > > > > 1. When trying to get a list: friends of friends (that are not my own > friends), I write the following query, however my own friends still show up > and some entries are duplicates. > > START id_my=(11) MATCH > (id_my)-[:KNOWS]->(f)<-[:KNOWS]->(id_o)-[:KNOWS]->(fof) WHERE > NOT(f.number=fof.number) RETURN f > > > > a. How do I remove my own friends from the returning subset? > > b. How do I remove the duplicates in the returning array? > > c. How do I make sure they are prioritized in the right order? (maybe > connected to the b. question) > > > > 2. Are there any resources where I can read more about how to use > indexes? > > I mean very practical examples of how they are set up and used. > > > > Thank you guys! > > > > Best Regards > > Nami Zarringhalam > > CEO > > > > E-mail: <mailto:[email protected]> > [email protected] > > URL: <http://www.truecaller.com/> www.truecaller.com > > Phone: +46(0)73 - 669 39 89 > > Skype: nami.zarringhalam > > --------------------------------- > > TrueCaller, a global phonebook, in the palm of your hand! > > Download for free at truecaller.com from your cellphone today! > > --------------------------------- > > This email and any attachments are the property of True Software Scandinavia > AB. It is intended only for the person or entity to which it is addressed > and may contain information which is confidential, privileged or otherwise > protected from disclosure. Distribution or copying of this email or the > information contained herein by anyone other than the intended recipient is > prohibited. If you have received this email in error, please immediately > notify the sender by email at <mailto:[email protected]> > [email protected] and please delete and destroy any copies of > this email and its attachments, if any. > > > > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user ------------------------------ Message: 4 Date: Tue, 12 Jul 2011 08:39:52 -0400 From: Josh Adell <[email protected]> Subject: Re: [Neo4j] User Digest, Vol 52, Issue 53 To: [email protected] Message-ID: <ca+dvwpdybjkvcd1iyfawg3rkexauahtw-8ab-0qluywmbhy...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Mike, Try "return_filter" and "max_depth". I believe most of the JSON property names are underscore separated now. I don't know if "depth first" also needs the underscore. -- Josh Adell > > Message: 3 > Date: Tue, 12 Jul 2011 03:39:14 -0700 (PDT) > From: mike_t <[email protected]> > Subject: [Neo4j] Problems with neo4j 1.4 rest server and filter > To: [email protected] > Message-ID: <[email protected]> > Content-Type: text/plain; charset=us-ascii > > Hi, > I have some problems with the new version of neo4j. > > For my application i wrote a few unit test. These worked perfectly in neo4j > 1.2 and 1.3 but not in 1.4. > > For example: > I wanna have all relationships for a node with a special name. So I post > following message to the url > http://localhost:7474/db/data/node/1/traverse/relationship : > > > { ?"order" : "depth first", ?"uniqueness" : "relationship", "return filter" > : { "language" : "javascript", "body" : "position.length() > 0 && > position.lastRelationship().getProperty('name').toLowerCase().indexOf('test' )!=-1" > }, "max depth" : 1 } > > I think neo4j ignores the filter and returns all relationships. > > > -- > View this message in context: http://neo4j-user-list.438527.n3.nabble.com/Problems-with-neo4j-1-4-rest-ser ver-and-filter-tp3162043p3162043.html > Sent from the Neo4J User List mailing list archive at Nabble.com. > > ------------------------------ Message: 5 Date: Tue, 12 Jul 2011 20:18:18 +0700 From: Eddy Respondek <[email protected]> Subject: [Neo4j] missing required jta.jar for debian? To: [email protected] Message-ID: <CAF86dwaZiNV0ejPOeX-hhVB7VC3tqM8s1i+NrSaxpG7=w6k...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 I'm currently getting the following error message in Debian Lenny when trying to run a class file. Exception in thread "main" java.lang.NoClassDefFoundError: javax/transaction/TransactionManager As far as I can tell Debian is missing a jta.jar file which is apparently apart Java EE 6 but this isn't one of Debian packages. Do I need to manually install Java EE 6 or can I get JTA.jar somewhere separately? More info.... javac -cp /usr/share/java/neo4j-kernel.jar:/usr/share/java/jta.jar /tmp/gpneo4jimport.java java -cp /tmp:/usr/share/java/neo4j-kernel.jar:/usr/share/java/jta.jar gpneo4jimport java version "1.6.0_22" Java(TM) SE Runtime Environment (build 1.6.0_22-b04) Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode) ------------------------------ Message: 6 Date: Tue, 12 Jul 2011 16:32:19 +0300 From: Chris Gioran <[email protected]> Subject: Re: [Neo4j] missing required jta.jar for debian? To: Neo4j user discussions <[email protected]> Message-ID: <caddlr8rc1ny4b+ylu1ozwujswhgryqoykuhgzxgeuwhjjqv...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Hi Eddy, what you are missing is the JTA specification jar. You can find a copy here: http://repo1.maven.org/maven2/org/apache/geronimo/specs/geronimo-jta_1.1_spe c/1.1/geronimo-jta_1.1_spec-1.1.jar Neo4j uses maven to manage its dependencies so that such necessary libraries are located and downloaded automatically. This has the additional advantage that if you have a dependency management system as well all this will be automatically taken care for you. To get back to your questions, no, JavaEE is nowhere near needed for running neo4j. For the kernel you will need, apart from JTA above, http://repo1.maven.org/maven2/org/osgi/osgi_R4_core/1.0/osgi_R4_core-1.0.jar http://repo1.maven.org/maven2/org/osgi/osgi_R4_compendium/1.0/osgi_R4_compen dium-1.0.jar as well and you should be good to go. For the tests, junit is also needed. I don't know of a way to have these dependencies managed from the package managers that come with linux distros, so either a dependency manager or manual downloads are your options here. In general, the pom.xml in every project has a listing of all the dependencies you will need. cheers, CG On Tue, Jul 12, 2011 at 4:18 PM, Eddy Respondek <[email protected]> wrote: > I'm currently getting the following error message in Debian Lenny when > trying to run a class file. > > Exception in thread "main" java.lang.NoClassDefFoundError: > javax/transaction/TransactionManager > > As far as I can tell Debian is missing a jta.jar file which is apparently > apart Java EE 6 but this isn't one of Debian packages. > > Do I need to manually install Java EE 6 or can I get JTA.jar somewhere > separately? > > More info.... > javac -cp /usr/share/java/neo4j-kernel.jar:/usr/share/java/jta.jar > /tmp/gpneo4jimport.java > java -cp /tmp:/usr/share/java/neo4j-kernel.jar:/usr/share/java/jta.jar > gpneo4jimport > > java version "1.6.0_22" > Java(TM) SE Runtime Environment (build 1.6.0_22-b04) > Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode) > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > ------------------------------ Message: 7 Date: Tue, 12 Jul 2011 21:42:58 +0800 (CST) From: ??? <[email protected]> Subject: [Neo4j] how setup lucene fulltext search filter To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=GBK I like to filter fulltext search result,but don't kown where to set lucene search filter. I notice file LuceneIndex.java , line 355, Hits hits = new Hits( searcher, query, null, sorting, forceScore ); line 370, Hits hits = new Hits( additionsSearcher, query, null ); all pass null for filter. So Neo4j disable lucene search filter? how setup lucene fulltext search filter? Thanks in advance. Edgar, ------------------------------ Message: 8 Date: Tue, 12 Jul 2011 10:56:50 -0300 From: Adriano Henrique de Almeida <[email protected]> Subject: Re: [Neo4j] how setup lucene fulltext search filter To: Neo4j user discussions <[email protected]> Message-ID: <cahvls_qamve7vm-syv6sfn1fmusmhqajfyyoy9fkvzwbp3q...@mail.gmail.com> Content-Type: text/plain; charset=UTF-8 Hi Edgard, sure you can do a FullText Search on your data with Lucene and Neo4j. Did you take a look here http://docs.neo4j.org/chunked/1.4/indexing-create-advanced.html If you need any other help, just let us know. Regards. 2011/7/12 ??? <[email protected]> > I like to filter fulltext search result,but don't kown where to set lucene > search filter. > > > I notice file LuceneIndex.java , > line 355, > Hits hits = new Hits( searcher, query, null, sorting, forceScore ); > line 370, > Hits hits = new Hits( additionsSearcher, query, null ); > > > all pass null for filter. > > > So Neo4j disable lucene search filter? > how setup lucene fulltext search filter? > > > Thanks in advance. > > > Edgar, > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user > -- Adriano Almeida Caelum | Ensino e Inova??o www.caelum.com.br ------------------------------ Message: 9 Date: Tue, 12 Jul 2011 06:57:15 -0700 (PDT) From: mike_t <[email protected]> Subject: Re: [Neo4j] Problems with neo4j 1.4 rest server and filter To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=us-ascii Thanks a lot for your answer. Now it works perfect! -- View this message in context: http://neo4j-user-list.438527.n3.nabble.com/Problems-with-neo4j-1-4-rest-ser ver-and-filter-tp3162043p3162493.html Sent from the Neo4J User List mailing list archive at Nabble.com. ------------------------------ Message: 10 Date: Tue, 12 Jul 2011 17:10:52 +0200 From: Zhiguo Zhang <[email protected]> Subject: [Neo4j] Gremlin compiler problem (mvn2) ! To: [email protected] Message-ID: <CA+TAK4gas30upu3V_bYU_MJzh1FzP35mPGc1ai=zobgddwy...@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 hi, when I run the following command: mvn clean package I got the following FATAL ERROR, for the neo4j 1.4 I want to have a Gremlin plug-in. Please help, Thank you! [INFO] Scanning for projects... Downloading: https://m2.neo4j.org/content/groups/public//org/neo4j/parent-pom/21/parent-p om-21.pom [WARNING] Unable to get resource 'org.neo4j:parent-pom:pom:21' from repository neo4j-dev (https://m2.neo4j.org/content/groups/public/): Error transferring file: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty Downloading: http://tinkerpop.com/maven2/org/neo4j/parent-pom/21/parent-pom-21.pom [INFO] Unable to find resource 'org.neo4j:parent-pom:pom:21' in repository tinkerpop-repository (http://tinkerpop.com/maven2) Downloading: http://download.java.net/maven/2//org/neo4j/parent-pom/21/parent-pom-21.pom [INFO] Unable to find resource 'org.neo4j:parent-pom:pom:21' in repository maven2-repository.dev.java.net (http://download.java.net/maven/2/) Downloading: http://download.java.net/maven/1/org.neo4j/poms/parent-pom-21.pom [INFO] Unable to find resource 'org.neo4j:parent-pom:pom:21' in repository maven-repository.dev.java.net (http://download.java.net/maven/1) Downloading: http://developer.jasig.org/repo/content/repositories/3rd-party/org/neo4j/par ent-pom/21/parent-pom-21.pom [INFO] Unable to find resource 'org.neo4j:parent-pom:pom:21' in repository jasig-3rd-party ( http://developer.jasig.org/repo/content/repositories/3rd-party) Downloading: http://repo1.maven.org/maven2/org/neo4j/parent-pom/21/parent-pom-21.pom [INFO] Unable to find resource 'org.neo4j:parent-pom:pom:21' in repository central (http://repo1.maven.org/maven2) [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error building POM (may not be this project's POM). Project ID: org.neo4j.server.plugin:neo4j-gremlin-plugin:jar:1.5-SNAPSHOT Reason: Cannot find parent: org.neo4j:parent-pom for project: org.neo4j.server.plugin:neo4j-gremlin-plugin:jar:1.5-SNAPSHOT for project org.neo4j.server.plugin:neo4j-gremlin-plugin:jar:1.5-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.neo4j:parent-pom for project: org.neo4j.server.plugin:neo4j-gremlin-plugin:jar:1.5-SNAPSHOT for project org.neo4j.server.plugin:neo4j-gremlin-plugin:jar:1.5-SNAPSHOT at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:404) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:272) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.project.ProjectBuildingException: Cannot find parent: org.neo4j:parent-pom for project: org.neo4j.server.plugin:neo4j-gremlin-plugin:jar:1.5-SNAPSHOT for project org.neo4j.server.plugin:neo4j-gremlin-plugin:jar:1.5-SNAPSHOT at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultM avenProjectBuilder.java:1396) at org.apache.maven.project.DefaultMavenProjectBuilder.buildInternal(DefaultMav enProjectBuilder.java:823) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInter nal(DefaultMavenProjectBuilder.java:508) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjec tBuilder.java:200) at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:604) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:487) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:391) ... 12 more Caused by: org.apache.maven.project.ProjectBuildingException: POM 'org.neo4j:parent-pom' not found in repository: Unable to download the artifact from any repository org.neo4j:parent-pom:pom:21 from the specified remote repositories: central (http://repo1.maven.org/maven2), tinkerpop-repository (http://tinkerpop.com/maven2), jasig-3rd-party ( http://developer.jasig.org/repo/content/repositories/3rd-party), neo4j-dev (https://m2.neo4j.org/content/groups/public/), maven2-repository.dev.java.net (http://download.java.net/maven/2/), maven-repository.dev.java.net (http://download.java.net/maven/1) for project org.neo4j:parent-pom at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository( DefaultMavenProjectBuilder.java:605) at org.apache.maven.project.DefaultMavenProjectBuilder.assembleLineage(DefaultM avenProjectBuilder.java:1392) ... 18 more Caused by: org.apache.maven.artifact.resolver.ArtifactNotFoundException: Unable to download the artifact from any repository org.neo4j:parent-pom:pom:21 from the specified remote repositories: central (http://repo1.maven.org/maven2), tinkerpop-repository (http://tinkerpop.com/maven2), jasig-3rd-party ( http://developer.jasig.org/repo/content/repositories/3rd-party), neo4j-dev (https://m2.neo4j.org/content/groups/public/), maven2-repository.dev.java.net (http://download.java.net/maven/2/), maven-repository.dev.java.net (http://download.java.net/maven/1) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultAr tifactResolver.java:228) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultAr tifactResolver.java:90) at org.apache.maven.project.DefaultMavenProjectBuilder.findModelFromRepository( DefaultMavenProjectBuilder.java:558) ... 19 more Caused by: org.apache.maven.wagon.ResourceDoesNotExistException: Unable to download the artifact from any repository at org.apache.maven.artifact.manager.DefaultWagonManager.getArtifact(DefaultWag onManager.java:404) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultAr tifactResolver.java:216) ... 21 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5 seconds [INFO] Finished at: Tue Jul 12 17:03:50 CEST 2011 [INFO] Final Memory: 1M/4M [INFO] ------------------------------------------------------------------------ ------------------------------ _______________________________________________ User mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user End of User Digest, Vol 52, Issue 54 ************************************ _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

