[Neo4j] Neo4j unable to delete database on file system after shutdown

2014-10-03 Thread Chris Brinkman
- Given I first create a newEmbeddedDatabase("/my-path") with Neo4j 2.1.4 - And I create some nodes successfully (committing transactions) - And I call shutdown() on my database - When I attempt to delete "/my-path" (FileUtils.forceDelete(...)) - Then I consistently see this Jav

Re: [Neo4j] Re: Query taking so long and not giving result

2014-10-03 Thread Michael Hunger
Yes you can, e.g. :Assault or :Theft Not sure what you mean with (2) Perhaps you should setup your sample graph as a graphgist and add your usecase queries there so it would be easier to reason about. On Sat, Oct 4, 2014 at 12:53 AM, Mohana Krishna, IIT Bombay, India < mohana...@gmail.com> wrote

Re: [Neo4j] Re: Temporary tables and views in Neo4j

2014-10-03 Thread Michael Hunger
you can also do a map of sets, with the type as key On Sat, Oct 4, 2014 at 12:57 AM, Mohana Krishna, IIT Bombay, India < mohana...@gmail.com> wrote: > In my algorithm, if there are say 17 types, then I need to enumerate all > possible cliques for each of size-3 combinations of total 17 types. > S

[Neo4j] Re: Temporary tables and views in Neo4j

2014-10-03 Thread Mohana Krishna, IIT Bombay, India
In my algorithm, if there are say 17 types, then I need to enumerate all possible cliques for each of size-3 combinations of total 17 types. Similarly for size-4, all possible cliques for each of size-4 combinations of total 17 types and so on. So, is the idea of using sets in java good (since

[Neo4j] Re: Query taking so long and not giving result

2014-10-03 Thread Mohana Krishna, IIT Bombay, India
Without repeating full match again (no index used), my query is taking 8 minutes. I have a graph DB with 150 nodes as I am testing currently, but in future it will have large number of nodes. Two things I wish to ask you: 1) All my nodes have 'crime_type' as an attribute. I have not give any s

Re: [Neo4j] Re: Temporary tables and views in Neo4j

2014-10-03 Thread Michael Hunger
Not sure, depends on your algorithm. I thought one set per clique-size is good enough. On Sat, Oct 4, 2014 at 12:43 AM, Mohana Krishna, IIT Bombay, India < mohana...@gmail.com> wrote: > That way, if the maximum clique size I can have is 17, then at size-3 > level I need to check 17C3 different cl

[Neo4j] Re: Temporary tables and views in Neo4j

2014-10-03 Thread Mohana Krishna, IIT Bombay, India
That way, if the maximum clique size I can have is 17, then at size-3 level I need to check 17C3 different clique combinations. Do I need to store results of all these in 17 different sets? Is my understanding correct? Thanks for the reply, Michael. On Sunday, 21 September 2014 04:27:05 UTC+5:

Re: [Neo4j] Re: Temporary tables and views in Neo4j

2014-10-03 Thread Michael Hunger
As there are no temporary tables in cypher, I'd probably write some java code in a server extension that holds your intermediate results in sets for the 3,4,5 size cliques and iterate over these sets to find the next largest cliques. Michael On Fri, Oct 3, 2014 at 10:46 PM, Mohana Krishna, IIT B

Re: [Neo4j] Traversing Large (weighted) graphs: performance, data structure, indexes

2014-10-03 Thread Michael Hunger
How many paths are returned from your query? MATCH p = (n)-[*0..2]-(m) where id(n) = 103105 and id(m) = 1386672 return p, reduce(totProximity = 0, n IN relationships(p)| totProximity + n.proximity) AS pathProximity order by pathProximity DESC; your index is on :Topic(name) ? MATCH p = (n:Topic)-

Re: [Neo4j] Query taking so long and not giving result

2014-10-03 Thread Michael Hunger
Don't repeat your full match time and again (it will be a full graph scan every time) how much data do you have in your graph after all this is a global query? so for your query I recommend at least to add a label + index create index on :Crime(type); MATCH (k:Crime {type:"ASSAULT"})-[:CLOSE_T

[Neo4j] Traversing Large (weighted) graphs: performance, data structure, indexes

2014-10-03 Thread gg4u
Hi, here my new answer, I got into this issue: I have a large weighted graph with only one schema index on nodes (Topic): 4M topics and 100M rels. I wanted to find paths between two given nodes. I tried out with queries like this one: since it is a weighted graph, I compute the weighted path be

[Neo4j] Re: Temporary tables and views in Neo4j

2014-10-03 Thread Mohana Krishna, IIT Bombay, India
Michael, How can I go forward? I wish to store temporary results as my application does level wise result building. Any way to get/emulate the functionality of temporary tables/views?? Please give some input. On Sunday, 21 September 2014 04:27:05 UTC+5:30, Mohana Krishna, IIT Bombay, India w

[Neo4j] Re: Query taking so long and not giving result

2014-10-03 Thread Mohana Krishna, IIT Bombay, India
Someone please help. Is this the correct way of posing query? This query gave me output after 21 minutes. But the output is not as expected. It has given the individual counts of all 4 (k,l,m,n of types mentioned in above query) without accounting for relationships I have used in MATCH clause!!

Re: [Neo4j] batch import 2.0 > failed automatic indexing?

2014-10-03 Thread XDiscovery Team
Oh I see, I thought it didn't matter cause I only have one type of nodes, but i guess the difference is the schema index here: with your fix is looking within the schema right? now I get the same time as where id(n) = ... thank you On Fri, Oct 3, 2014 at 6:38 PM, Michael Hunger < michael.hun.

Re: [Neo4j] batch import 2.0 > failed automatic indexing?

2014-10-03 Thread Michael Hunger
You forgot to use the label :topic on your query Von meinem iPhone gesendet > Am 03.10.2014 um 15:30 schrieb Luigi Assom : > > Update: > after creating an index on property of type integer, fetching a node by id > seems it take same time as by name (fulltext index): ~6K ms > create index on:top

Re: [Neo4j] Access control strategy for dispersed/ad-hoc queries

2014-10-03 Thread Michael Hunger
Yay! Good idea Yes please keep us posted Have a great weekend Von meinem iPhone gesendet > Am 03.10.2014 um 15:22 schrieb Anthony Plant : > > I've been thinking about this and I think you're right - I had been > struggling to get my head around how to create a strongly-typed querying > mech

[Neo4j] Query taking so long and not giving result

2014-10-03 Thread Mohana Krishna, IIT Bombay, India
I have issued a following query as part of my application: MATCH (k{type:"ASSAULT"})-[r1:CLOSE_TO]->( l {type:"BATTERY"}), (k{type:"ASSAULT"})-[r2:CLOSE_TO]->(m{type:"THEFT"}), (k{type:"ASSAULT"})-[r3:CLOSE_TO]->(n{type:"NARCOTICS"}), ( l {type:"BATTERY"})-[r4:CLOSE_TO]->(m{type:"THEFT"}),

Re: [Neo4j] batch import 2.0 > failed automatic indexing?

2014-10-03 Thread Luigi Assom
Update: after creating an index on property of type integer, fetching a node by id seems it take same time as by name (fulltext index): ~6K ms create index on:topic(id) (note here id is not the interna lnode identifier of neo) MATCH (n) WHERE n.id =9996533 Return n; ~6K ms while with internal id

Re: [Neo4j] Access control strategy for dispersed/ad-hoc queries

2014-10-03 Thread Anthony Plant
I've been thinking about this and I think you're right - I had been struggling to get my head around how to create a strongly-typed querying mechanism for my domain but I think I might have cracked it. I'm looking at wrapping Neo4jClient in a domain-specific fluent API that exposes methods like

Re: [Neo4j] batch import 2.0 > failed automatic indexing?

2014-10-03 Thread XDiscovery Team
Oh I see, I did create index on:topic(name) and read your useful post Again questions about the confusion: in your post you wrote i should not mix the indexes, and that if i need to use fulltext, then legacy indexes are the one to use. 1. Could you please brief me on the proper index to set (

Re: [Neo4j] Need 1.8.3 linux community edition

2014-10-03 Thread Chris Vest
For the community edition you'll want this link instead: http://neo4j.com/download-thanks/?edition=community&release=1.8.3&flavour=unix -- Chris Vest System Engineer, Neo Technology [ skype: mr.chrisvest, twitter: chvest ] On 02 Oct 2014, at 16:30, Javier de la Rosa wrote: > Not active on the

Re: [Neo4j] batch import 2.0 > failed automatic indexing?

2014-10-03 Thread Michael Hunger
Run :schema in the browser or "schema" in the shell and see what schema indexes are listed. And make sure to read this: http://nigelsmall.com/neo4j/index-confusion for this: MATCH (n:topic)-[r]-(m) where.name = 'TITLE' RETURN m ORDER BY r.weight DESC LIMIT 6 do create index on :topic(name); t

Re: [Neo4j] batch import 2.0 > failed automatic indexing?

2014-10-03 Thread gg4u
Thank you Micheal I will check typos, in the example I posted ones just for example. However, I do have indexes in my nodes:type (topic), node.properties: name and ID (id is integer) and set up node_auto_index But it takes AGES to locate a node, and ages to compute a simple query! I suspect th