Re: [Neo4j] Hierarchical facets
Hi Michael, have you been able to look at the profiling info that I sent you ? Perhaps we can have a chat on it tomorrow in Amsterdam .. Best, Tom Met vriendelijke groet / With kind regards Ir. T. Zeppenfeldt van der Waalsstraat 30 6706 JR Wageningen The Netherlands Mobile: +31 6 23 28 78 06 Phone: +31 3 17 84 22 17 E-mail: t.zeppenfe...@ophileon.com t.zeppenfe...@ophileon.comWeb: www.ophileon.com Twitter: tomzeppenfeldt Skype: tomzeppenfeldt 2014-05-21 21:23 GMT+02:00 Michael Hunger michael.hun...@neotechnology.com : That's why I suggested UNION. So the two individual queries take 14s? Still way too long. On Wed, May 21, 2014 at 3:40 PM, Tom Zeppenfeldt tomzeppenfe...@gmail.com wrote: I have some problems starting the shell from my Mac Terminal (it's giving me a out of mem error) , but form the webadmin powerconsole. Can't find any documentation either on how to set shell to have me return profile. neo4j-sh (?)$ export termname=Eurovoc *Your first Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 ; == +-+ == | t.name | count | == +-+ == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == | rechtsvordering | 915 | == +-+ == 10 rows *== 8775 ms* *Your second Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == SyntaxException: t not defined (line 1, column 79) == match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 == ^ neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t2.name, count(distinct j) as count order by count desc limit 10; == +---+ == | t2.name | count | == +---+ == | Eurovoc | 9576 | == +---+ == 1 row *== 3668 ms* But what I need is to include the docs on both the term I request and the count on its children, like this. I notice that the combination takes longer than the two separate queries combined. neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT*0..1]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == +-+ == | t.name | count | == +-+ == | Eurovoc | 9576 | == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == +-+ == 10 rows *== 17802 ms* -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Neo4j] Hierarchical facets
yep, the two individual ones combined take about 12-13 secs . what does the profiling tell you? Met vriendelijke groet / With kind regards Ir. T. Zeppenfeldt van der Waalsstraat 30 6706 JR Wageningen The Netherlands Mobile: +31 6 23 28 78 06 Phone: +31 3 17 84 22 17 E-mail: t.zeppenfe...@ophileon.com t.zeppenfe...@ophileon.comWeb: www.ophileon.com Twitter: tomzeppenfeldt Skype: tomzeppenfeldt 2014-05-21 21:23 GMT+02:00 Michael Hunger michael.hun...@neotechnology.com : That's why I suggested UNION. So the two individual queries take 14s? Still way too long. On Wed, May 21, 2014 at 3:40 PM, Tom Zeppenfeldt tomzeppenfe...@gmail.com wrote: I have some problems starting the shell from my Mac Terminal (it's giving me a out of mem error) , but form the webadmin powerconsole. Can't find any documentation either on how to set shell to have me return profile. neo4j-sh (?)$ export termname=Eurovoc *Your first Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 ; == +-+ == | t.name | count | == +-+ == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == | rechtsvordering | 915 | == +-+ == 10 rows *== 8775 ms* *Your second Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == SyntaxException: t not defined (line 1, column 79) == match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 == ^ neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t2.name, count(distinct j) as count order by count desc limit 10; == +---+ == | t2.name | count | == +---+ == | Eurovoc | 9576 | == +---+ == 1 row *== 3668 ms* But what I need is to include the docs on both the term I request and the count on its children, like this. I notice that the combination takes longer than the two separate queries combined. neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT*0..1]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == +-+ == | t.name | count | == +-+ == | Eurovoc | 9576 | == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == +-+ == 10 rows *== 17802 ms* -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[Neo4j] Hierarchical facets
Hi, after publishing this graphgist http://gist.neo4j.org/?05d92f567adbe971afc5 , Michael suggested to change the pattern and providing a profile. This is the result: The query is { query : match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT*0..1]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10, params: {termname : Eurovoc} } and mydomain:7474/db/data/cypher?profile=true returns after 15 secs (the pattern with (j:jurt)-[:HAS_TERM|BT*0..]-(t:term) took 20 sec) { columns: [ t.name, count ], data: [ [ Eurovoc, 9576 ], [ gezondheidsbeleid, 1823 ], [ overtreding, 1393 ], [ Europese organisatie, 1389 ], [ EU-instantie, 1323 ], [ mondiale organisatie, 1277 ], [ gespecialiseerde instelling van de VN, 1143 ], [ handeling van de EU, 1129 ], [ internationaal publiekrecht, 1091 ], [ sociaal beleid, 971 ] ], plan: { args: { returnItemNames: [ t.name, count ], _rows: 10, _db_hits: 0, symKeys: [ t.name, INTERNAL_AGGREGATE8f87b8f0-a925-43fd-aa9b-2319f9efee52 ] }, dbHits: 0, name: ColumnFilter, children: [ { args: { limit: Literal(10), orderBy: [ SortItem(Cached( INTERNAL_AGGREGATE8f87b8f0-a925-43fd-aa9b-2319f9efee52 of type Integer),false) ], _rows: 10, _db_hits: 0 }, dbHits: 0, name: Top, children: [ { args: { keys: [ Cached(t.name of type Any) ], _rows: 5276, aggregates: [ ( INTERNAL_AGGREGATE8f87b8f0-a925-43fd-aa9b-2319f9efee52,Distinct(Count(j),j)) ], _db_hits: 0 }, dbHits: 0, name: EagerAggregation, children: [ { args: { _rows: 877826, _db_hits: 877826, exprKeys: [ t.name ], symKeys: [ UNNAMED30, j, t, UNNAMED14, UNNAMED50, t2, UNNAMED29 ] }, dbHits: 877826, name: Extract, children: [ { args: { _rows: 877826, _db_hits: 0, pred: hasLabel(j:jurt(1)) }, dbHits: 0, name: Filter, children: [ { args: { g: (j)-[' UNNAMED14']-( UNNAMED29),( UNNAMED29)-[' UNNAMED30']-(t), _rows: 877826, _db_hits: 877850 }, dbHits: 877850, name: PatternMatcher, children: [ { args: { _rows: 8466, _db_hits: 0,
Re: [Neo4j] Hierarchical facets
I have some problems starting the shell from my Mac Terminal (it's giving me a out of mem error) , but form the webadmin powerconsole. Can't find any documentation either on how to set shell to have me return profile. neo4j-sh (?)$ export termname=Eurovoc *Your first Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 ; == +-+ == | t.name | count | == +-+ == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == | rechtsvordering | 915 | == +-+ == 10 rows *== 8775 ms* *Your second Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == SyntaxException: t not defined (line 1, column 79) == match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 == ^ neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t2.name, count(distinct j) as count order by count desc limit 10; == +---+ == | t2.name | count | == +---+ == | Eurovoc | 9576 | == +---+ == 1 row *== 3668 ms* But what I need is to include the docs on both the term I request and the count on its children, like this. I notice that the combination takes longer than the two separate queries combined. neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT*0..1]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == +-+ == | t.name | count | == +-+ == | Eurovoc | 9576 | == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == +-+ == 10 rows *== 17802 ms* -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Neo4j] Hierarchical facets
Prefix your query with profile Sent from mobile device Am 21.05.2014 um 15:40 schrieb Tom Zeppenfeldt tomzeppenfe...@gmail.com: I have some problems starting the shell from my Mac Terminal (it's giving me a out of mem error) , but form the webadmin powerconsole. Can't find any documentation either on how to set shell to have me return profile. neo4j-sh (?)$ export termname=Eurovoc Your first Query neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 ; == +-+ == | t.name | count | == +-+ == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == | rechtsvordering | 915 | == +-+ == 10 rows == 8775 ms Your second Query neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == SyntaxException: t not defined (line 1, column 79) == match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 == ^ neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t2.name, count(distinct j) as count order by count desc limit 10; == +---+ == | t2.name | count | == +---+ == | Eurovoc | 9576 | == +---+ == 1 row == 3668 ms But what I need is to include the docs on both the term I request and the count on its children, like this. I notice that the combination takes longer than the two separate queries combined. neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT*0..1]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == +-+ == | t.name | count | == +-+ == | Eurovoc | 9576 | == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == +-+ == 10 rows == 17802 ms -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Neo4j] Hierarchical facets
yeah.. found that out too .. profiled things are already in groups. Met vriendelijke groet / With kind regards Ir. T. Zeppenfeldt van der Waalsstraat 30 6706 JR Wageningen The Netherlands Mobile: +31 6 23 28 78 06 Phone: +31 3 17 84 22 17 E-mail: t.zeppenfe...@ophileon.com t.zeppenfe...@ophileon.comWeb: www.ophileon.com Twitter: tomzeppenfeldt Skype: tomzeppenfeldt 2014-05-21 16:36 GMT+02:00 Michael Hunger michael.hun...@neotechnology.com : Prefix your query with profile Sent from mobile device Am 21.05.2014 um 15:40 schrieb Tom Zeppenfeldt tomzeppenfe...@gmail.com: I have some problems starting the shell from my Mac Terminal (it's giving me a out of mem error) , but form the webadmin powerconsole. Can't find any documentation either on how to set shell to have me return profile. neo4j-sh (?)$ export termname=Eurovoc *Your first Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 ; == +-+ == | t.name | count | == +-+ == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == | rechtsvordering | 915 | == +-+ == 10 rows *== 8775 ms* *Your second Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == SyntaxException: t not defined (line 1, column 79) == match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 == ^ neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t2.name, count(distinct j) as count order by count desc limit 10; == +---+ == | t2.name | count | == +---+ == | Eurovoc | 9576 | == +---+ == 1 row *== 3668 ms* But what I need is to include the docs on both the term I request and the count on its children, like this. I notice that the combination takes longer than the two separate queries combined. neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT*0..1]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == +-+ == | t.name | count | == +-+ == | Eurovoc | 9576 | == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == +-+ == 10 rows *== 17802 ms* -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [Neo4j] Hierarchical facets
That's why I suggested UNION. So the two individual queries take 14s? Still way too long. On Wed, May 21, 2014 at 3:40 PM, Tom Zeppenfeldt tomzeppenfe...@gmail.comwrote: I have some problems starting the shell from my Mac Terminal (it's giving me a out of mem error) , but form the webadmin powerconsole. Can't find any documentation either on how to set shell to have me return profile. neo4j-sh (?)$ export termname=Eurovoc *Your first Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 ; == +-+ == | t.name | count | == +-+ == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == | rechtsvordering | 915 | == +-+ == 10 rows *== 8775 ms* *Your second Query* neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == SyntaxException: t not defined (line 1, column 79) == match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10 == ^ neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t2:term {name:{termname}}) return t2.name, count(distinct j) as count order by count desc limit 10; == +---+ == | t2.name | count | == +---+ == | Eurovoc | 9576 | == +---+ == 1 row *== 3668 ms* But what I need is to include the docs on both the term I request and the count on its children, like this. I notice that the combination takes longer than the two separate queries combined. neo4j-sh (?)$ match (j:jurt)-[:HAS_TERM]-()-[:BT*0..]-(t:term)-[:BT*0..1]-(t2:term {name:{termname}}) return t.name, count(distinct j) as count order by count desc limit 10; == +-+ == | t.name | count | == +-+ == | Eurovoc | 9576 | == | gezondheidsbeleid | 1823 | == | overtreding | 1393 | == | Europese organisatie | 1389 | == | EU-instantie | 1323 | == | mondiale organisatie | 1277 | == | gespecialiseerde instelling van de VN | 1143 | == | handeling van de EU | 1129 | == | internationaal publiekrecht | 1091 | == | sociaal beleid| 971 | == +-+ == 10 rows *== 17802 ms* -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups Neo4j group. To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.