Re: [Neo4j] Neomodel for neo4j 4.x

2020-08-19 Thread 'Nigel Small' via Neo4j
Hi Monica

Unfortunately, we don't support or maintain neomodel in-house. I'm not sure
it even has a current maintainer right now, either, but you're probably
best off asking on the project's GitHub issues list. If you're after a
general purpose OGM for Python, though, I do offer this in py2neo as well.

Nigel

On Sat, 15 Aug 2020 at 01:03, Monica Gatti  wrote:

> Hi guys,
> is supposed that a new version of neomodel can support neo4j 4.x?
> At now, neomodel supports only neo4j 3.0, 3.1, 3.2, 3.3 
> Any news?
> Thanks in advance
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/neo4j/b464604b-bb03-4245-b02a-8e7da2b13eb4o%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/neo4j/CACYW5h7ANUta8_kyrzFv8z2LhWsa%2B%2BddyudODA1Q%3DTcajVh%3DJA%40mail.gmail.com.


Re: [Neo4j] Re: Warning message, too much data after closed for HttpChannelOverHttp

2017-12-18 Thread 'Nigel Small' via Neo4j
Hi Ray

Do you have a snippet of code that can reproduce the warning?

Thanks
Nigel

On Mon, 18 Dec 2017, 20:53 ,  wrote:

> I changed py2neo Graph handle creation using bolt protocol and still saw
> this Warning message. So, the Waring is *not* caused by py2neo
> transactions. Another developer uses HTTP protocol doing query/MATCH. Thus,
> the Warnings should be caused by query/MATCH. However, my question is still
> why these warnings happened. There were no debug lines at the timestamps
> when neo4j.log produced these warnings.
>
> Thanks,
> Ray
>
>
> On Monday, December 18, 2017 at 11:57:43 AM UTC-8, rfc...@gmail.com wrote:
>>
>> Hi,
>>
>> We are using Enterprise 3.3.0 and py2neo version 3. The Graph handle is
>> opened using http protocol. We use py2neo transaction
>> tx = graph.begin()
>> loop until 1000 stmt or total stmt and param size exceeds 12MB
>> tx.run(stmt, param)
>> tx.commit()
>>
>> We saw the following messages quite often:
>>
>> 2017-12-18 14:11:12.413+ WARN  badMessage:
>> java.lang.IllegalStateException: too much data after closed for
>> HttpChannelOverHttp@39704966{r=3,c=false,a=IDLE,uri=}
>>
>> 2017-12-18 14:16:21.367+ WARN  badMessage:
>> java.lang.IllegalStateException: too much data after closed for
>> HttpChannelOverHttp@3350f74a{r=7,c=false,a=IDLE,uri=}
>>
>> 2017-12-18 14:17:22.494+ WARN  badMessage:
>> java.lang.IllegalStateException: too much data after closed for
>> HttpChannelOverHttp@25399fee{r=5,c=false,a=IDLE,uri=}
>>
>> 2017-12-18 14:18:24.723+ WARN  badMessage:
>> java.lang.IllegalStateException: too much data after closed for
>> HttpChannelOverHttp@5c2dfec5{r=7,c=false,a=IDLE,uri=}
>>
>> 2017-12-18 14:19:26.061+ WARN  badMessage:
>> java.lang.IllegalStateException: too much data after closed for
>> HttpChannelOverHttp@7beb2d9{r=5,c=false,a=IDLE,uri=}
>>
>>
>> Any idea what caused these warnings?
>>
>>
>> Thanks,
>>
>> Ray
>>
> --
> 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] Neo4j timeout error happens occasionally with transaction size 4000

2017-09-06 Thread 'Nigel Small' via Neo4j
Have you tried with a smaller batch size?

Nigel

On 2 September 2017 at 01:38,  wrote:

> Our Python 3 program using version 3.1.2 py2neo on Neo4j Community Edition
> version 3.0.3. with transaction size about 4000, i.e. we do a transaction
> commit after we put 4,000 Cypher statements to a transaction.
>
> We open the py2neo Graph as this
>
> from py2neo import Graph
>
> g = Graph(bolt = False, user = .., password = ..)
>
>
> Once a long while we will get timeout error from Neo4j. Any idea why this
> kind of timeout happens? Stack trace of py2neo, exception log from
> neo4j.log and debug.log of when the timeout happened are included below.
> Note that our Python log  time zone is 7 hours behind UTC.
>
>
> Python 3 log including py2neo stack trace:
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,886 - read_qosmos - INFO -
> /opt/trendmicro/ddna/engine/flow_processor.py, line 603: stack_list =
> traceback.extract_stack(limit=10) + \
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,886 - read_qosmos - INFO -
> /opt/trendmicro/ddna/engine/flow_processor.py, line 4048: tx_b.commit()
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,886 - read_qosmos - INFO -
> /opt/trendmicro/ddna/engine/venv-flow-processor/lib/
> python3.4/site-packages/py2neo/database/__init__.py, line 1059:
> self._post(commit=True)
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,886 - read_qosmos - INFO -
> /opt/trendmicro/ddna/engine/venv-flow-processor/lib/
> python3.4/site-packages/py2neo/database/__init__.py, line 1220: rs =
> resource.post({"statements": self.statements})
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,886 - read_qosmos - INFO -
> /opt/trendmicro/ddna/engine/venv-flow-processor/lib/
> python3.4/site-packages/py2neo/database/http.py, line 203: response =
> self.__base.post(body, headers, **kwargs)
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,887 - read_qosmos - INFO -
> /opt/trendmicro/ddna/engine/venv-flow-processor/lib/
> python3.4/site-packages/py2neo/packages/httpstream/http.py, line 984:
> return rq.submit(**kwargs)
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,887 - read_qosmos - INFO -
> /opt/trendmicro/ddna/engine/venv-flow-processor/lib/
> python3.4/site-packages/py2neo/packages/httpstream/http.py, line 362:
> raise SocketError(code, description, host_port=uri.host_port)
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,887 - read_qosmos - WARNING
> - mp 0, ctx 1 Got an exception from commit(): timed out
>
> Sep  1 12:01:34 ddna-sjc 2017-09-01 12:01:34,887 - read_qosmos - INFO -
> Type of Exception is 
>
>
>
> from neo4j.log
>
> 2017-09-01 18:38:38.733+ WARN  badMessage: 
> java.lang.IllegalStateException:
> too much data after closed for HttpChannelOverHttp@4b2cc33{r=
> 5,c=false,a=IDLE,uri=-}
>
> 2017-09-01 19:01:35.111+ ERROR Failed to generate JSON output.
> java.util.concurrent.TimeoutException: Idle timeout expired: 3/3
> ms
>
> java.io.IOException: java.util.concurrent.TimeoutException: Idle timeout
> expired: 3/3 ms
>
> at org.eclipse.jetty.util.SharedBlockingCallback$Blocker.block(
> SharedBlockingCallback.java:234)
>
> at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:136)
>
> at org.eclipse.jetty.server.HttpOutput.write(HttpOutput.java:350)
>
> at com.sun.jersey.spi.container.servlet.WebComponent$Writer.
> write(WebComponent.java:300)
>
> at com.sun.jersey.spi.container.ContainerResponse$
> CommittingOutputStream.write(ContainerResponse.java:135)
>
> at org.neo4j.server.rest.web.TransactionalService$
> InterruptingOutputStream.write(TransactionalService.java:283)
>
> at org.codehaus.jackson.impl.Utf8Generator._flushBuffer(
> Utf8Generator.java:1754)
>
> at org.codehaus.jackson.impl.Utf8Generator._writeFieldName(
> Utf8Generator.java:432)
>
> at org.codehaus.jackson.impl.Utf8Generator.writeFieldName(
> Utf8Generator.java:282)
>
> at org.codehaus.jackson.JsonGenerator.writeNumberField(
> JsonGenerator.java:956)
>
> at org.neo4j.server.rest.transactional.ExecutionResultSerializer.
> writeStats(ExecutionResultSerializer.java:209)
>
> at org.neo4j.server.rest.transactional.ExecutionResultSerializer.
> statementResult(ExecutionResultSerializer.java:115)
>
> at org.neo4j.server.rest.transactional.TransactionHandle.
> executeStatements(TransactionHandle.java:316)
>
> at org.neo4j.server.rest.transactional.TransactionHandle.commit(
> TransactionHandle.java:150)
>
> at org.neo4j.server.rest.web.TransactionalService.lambda$
> executeStatementsAndCommit$28(TransactionalService.java:202)
>
> at 
> org.neo4j.server.rest.web.TransactionalService$$Lambda$169/499200393.write(Unknown
> Source)
>
> at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.
> writeTo(StreamingOutputProvider.java:71)
>
> at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.
> writeTo(StreamingOutputProvider.java:57)
>
> at com.sun.jersey.spi.container.ContainerResponse.write(
> ContainerResponse.java:302)
>
> at 

Re: [Neo4j] Re: py2neo and object model

2017-02-21 Thread 'Nigel Small' via Neo4j
Hey Antonina

I'm guessing that you're looking at documentation from an earlier version
of py2neo. The OGM module has been rewritten in v3 to take advantage of
labels (the old one used manual indexes instead) and can now be found at
*py2neo.ogm*. You can read up on it here -> http://py2neo.org/v3/ogm.html

Cheers
Nigel

On 21 February 2017 at 10:11, Antonina Panayiotou <twnia93b...@gmail.com>
wrote:

> Hello Nigel. I'm trying to make the example and either i have it as "from
> py2neo.ext.ogm import Store" or "from flask.ext.neo4j import Neo4j" it
> throws me the exception
> "from py2neo.ext.ogm import Store
> ImportError: No module named ogm "
> Do you know how to use the ogm extension? i'm working with python2.7 and
> py2neo
>
> Τη Δευτέρα, 15 Ιουνίου 2015 - 4:01:05 μ.μ. UTC+3, ο χρήστης Nigel Small
> έγραψε:
>>
>> Important note: The py2neo OGM module is old and works only with legacy
>> indexes, not schema indexes or any other Neo4j 2.0 concepts. Therefore, if
>> "of type" refers to labels, that's why.
>>
>> You have only one OGM action in the code you've shared and this is
>> *store.save_unique*. If you have an entry in your legacy index following
>> execution of this line then it has done everything it should do. If you
>> want a different action to take place, please clarify what that is.
>>
>> Regards
>> Nigel
>>
>> On 15 June 2015 at 13:51, Sumit Gupta <sumi...@gmail.com> wrote:
>>
>>> "object is not of type fruit" - What do you mean by that? Are you
>>> comparing this with ORM where you define your own Entities and every entity
>>> has correspnding tables?
>>>
>>> if yes, then please do not do that. Neo4j provides only Object Type =
>>> "Node", "Relationship", Label, Property/ Attribute.
>>>
>>> Thanks,
>>> Sumit
>>>
>>> On Sunday, 14 June 2015 23:33:52 UTC+5:30, Shekar Tippur wrote:
>>>
>>>>
>>>>
>>>> Hello,
>>>>
>>>> I am trying to use py2neo (http://py2neo.org/2.0/ext/ogm.html).
>>>> I am having trouble looking up a node.
>>>>
>>>> I already have a node stored. Fruit("mango")
>>>>
>>>> I am trying to add a User("Shekar") to like Fruit("mango")
>>>>
>>>> I am able to add 2 nodes but I am having trouble creating relationship.
>>>>
>>>> What is the best way to get a node given the fruit name, desrialize it
>>>> to something that can be a added as a relation?
>>>>
>>>> - Shekar
>>>>
>>>> --
>>> 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+un...@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] Rest API doesn't support empty arrays

2016-10-19 Thread 'Nigel Small' via Neo4j
Hi

As Alan mentions, this is a side-effect of both Neo4j's type system and the
JSON format used by the HTTP server. The type system at store level has no
concept of an untyped array and JSON has no way to transmit type
information independent of value, so it's impossible for the server to
determine what type the received array should be stored as. Clark's
suggestion of using a null would be typically used here; your application
can then choose to interpret a null/missing property as an empty list.

Nigel

On 19 October 2016 at 21:02, Clark Richey  wrote:

> Maybe I'm missing something but why do you want to store an empty array as
> a property? An empty array is logically equivalent to null. Null is
> logically equivalent to not storing a value for hat property. Not storing a
> value for a property is more efficient than writing value = null to disk.
>
> So, shouldn't you just not store a cars property in your example?
>
> Sent from my iPhone
>
> On Oct 19, 2016, at 14:49, Alan Robertson  wrote:
>
> In their data typing system, they need to know the type of the array
> elements.
>
> For example: Is it an array of strings, or ints, or floats?
>
> There is no "array of to-be-determined"...
>
> So, they don't consider it a bug...
>
> In my case either I don't set that attribute to a value when I create the
> object, or I set it to a single empty string as the value - like [""] and
> my code understands what this means.
>
> It definitely makes you have to work harder...
>
> -- Alan
>
>
> On 10/10/2016 01:02 AM, Red wrote:
>
>
> CREATE (root {name: "foobar", cars: []}) RETURN root
>
> Queries, like above are impossible through rest
>
> https://github.com/philippkueng/node-neo4j/issues/12
> https://github.com/versae/neo4j-rest-client/issues/130
>
> Isn't it a bug?
> --
> 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.
>

-- 
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] 'beginning implicit transaction' cannot be done... exception

2016-08-04 Thread 'Nigel Small' via Neo4j
Hi Matias

It's hard to tell without seeing some code. What concurrency are you
referring to?

I do think we need to fix that error though - it's very unhelpful to a
typical application developer. Coincidentally, we're currently working on
this part of the code so I'll make sure we improve the error message!

Nigel

On 3 August 2016 at 20:03, Matias Burak  wrote:

> Hi, anyone knows why I am getting this error?
>
>
> 'beginning implicit transaction' cannot be done when a session is in the
> 'IN_TRANSACTION' state.
>
>
> This is using java-driver v1.0.4 and bolt 3.0.4
>
>
> It looks that this is happening when the driver is doing a hasNext.
>
> Is that starting an implicit transaction?
>
> I think it might have to do with concurrent bolt calls to do certain
> operations? It's weird
>
> --
> 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] Nested Transactions Bolt

2016-06-02 Thread 'Nigel Small' via Neo4j
You won't be able to get that far. Beginning a transaction is only
permitted on a session if a transaction is not already open there. If you
try to do so, an exception will be thrown.

On 2 June 2016 at 22:23, Michael Johnson  wrote:

>
> So if I get a session and then call beginTransaction() on that session and
> then call beginTransaction() again on that same Session and commit it
> (before committing the first one) will both transactions be rolled back if
> I call failure() on the first transaction?
>
>
>
> On Tuesday, May 31, 2016 at 8:04:29 PM UTC-4, Michael Hunger wrote:
>>
>> No, but you can open a new session which has its own TX.
>>
>> Michael
>>
>> > Am 27.05.2016 um 21:24 schrieb Michael Johnson :
>> >
>> > Hello.  I'm migrating code from Embedded Neo4J to bolt.  I was
>> wondering if the behavior of transactions is still the same as with the
>> embedded API.  As in if you open a transaction within another transaction
>> is the newly opened transaction treated as a "placebo transaction," or has
>> that behavior changed?
>> >
>> > --
>> > 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+un...@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] Object orient programming fashion through py2neo

2016-05-15 Thread 'Nigel Small' via Neo4j
Hi

Py2neo has a load of documentation at py2neo.org and there is a bit of
sample code available within that. I'd suggest that you try to refine the
description of what you're trying to achieve though to be more specific.

Nigel

On 13 May 2016 at 05:35, Ashwanth D  wrote:

> I am using py2neo to execute my cypher queries. But, now I wanted the same
> to be done programatically in a Object oriented fashion. Like creating
> nodes, creating relationships, retrieving the nodes, updating the property
> values, etc,. If it is possible please share a sample program to do so.
>
> --
> 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] py2neo merge_one missing

2016-05-15 Thread 'Nigel Small' via Neo4j
Hi Phil

I can only assume that you are using the docs for py2neo v2 with py2neo v3.
The *merge_one* method no longer exists in v3 as you should be able to use
*merge* in all cases instead.

http://py2neo.org/v3/database.html#py2neo.database.Graph.merge

Cheers
Nige

On 15 May 2016 at 17:14, Phil Heltewig  wrote:

> Hi all,
>
> I am trying to use py2neo's merge_one function, but even when I copy the
> code directly from the documentation, I get told that the Graph object
> doesn't contain an attribute merge_one.
>
> Any idea what I could be doing wrong? Simply creating Nodes and
> Relationships and pushing them into the Graph via create() works fine.
>
> Cheers,
> Phil
>
> --
> 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] Neo4J New Bolt Driver for Python

2016-05-07 Thread 'Nigel Small' via Neo4j
The official driver is only a Cypher driver for Bolt-enabled servers. If
you need to use HTTP or any of the other functions you mentioned, you'll
need the broader community driver.

Nigel

On 3 May 2016 at 13:31, Sriram Mohan  wrote:

> I am new to Neo4J and playing around with Neo4J3.0 and the bolt driver for
> Python. Is the new driver limited to querying Neo4J using Cypher or can we
> programatically create Nodes, relationships, graphs similar to the options
> available in Py2Neo.
>
> --
> 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] Retrieve NodePointer.properties that was not inserted into DB yet

2016-04-11 Thread 'Nigel Small' via Neo4j
Hi Lucas

You should probably be using the `Node` object rather than the
`NodePointer` object. The latter only exists to support a few pieces of
older functionality and will not have access to properties or labels.

Nigel

On 30 March 2016 at 11:45, Lucas Lourenço  wrote:

> I'm using py2neo to insert some data into my neo4j db.
>
> I create arrays of NodePointers and Relations and insert them with
>
> for i in rels:
> test_graph.create(i)
>
> after the process.
>
> During the creation of my arrays I would like to check if a specific
> NodePointer was already added to the array or not (don't want to create two
> NodePointers with same name).
>
> Looking for a way to check a NodePointer properties, I've found this at
> py2neo documentation:
>
>
> >>> alice.properties["name"]
> 'Alice'
>
>
> but when I try to do:
>
>
> def isThereAThisInHere(this, here):
> for i in here:
> if (i.properties["name"] == this):
> return i
> return False
>
>
> mVar = isThereAThisInHere(defWord.wordVar[0],tempVar)
> if (mVar == False):
> mVar = Node("Variable",name=defWord.wordVar[0])
> tempVar.append(mVar)
>
>
> I get:
> 'NodePointer' object has no attribute 'labels'
>
> Does anyone have a solution or suggestion for my problem? Thank you.
>
> --
> 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] Cannot install py2neo: cannot import name SSLContext

2016-04-07 Thread Nigel Small
This will downgrade gracefully in the next beta release. For versions of
2.7 earlier than 2.7.9, SSL will be unavailable but the library should load
correctly.

On 5 April 2016 at 13:25, Christoph Pingel  wrote:

> BTW, I could reproduce this error on my Ubuntu 12.04 Server with Python
> 2.7.3, but I didn't have to install py2neo there (yet).
>
> best,
> Christoph
>
> 2016-04-05 14:24 GMT+02:00 Christoph Pingel :
>
>> Which version of pip/Python are you using?
>> ssl.SSLContext is only available in Python 2.7.9 or later:
>> https://docs.python.org/2/library/ssl.html#ssl.SSLContext
>>
>> Hope this helps,
>> best regards,
>> Christoph
>>
>> 2016-04-01 0:20 GMT+02:00 Alan Robertson :
>>
>>> Hi,
>>>
>>> When I try and do a pip install "py2neo>2.0.7", I get the same error on
>>> exactly two versions of Linux:
>>> *Ubuntu precise* and *Debian wheezy*. The errors are reproducible.
>>> Re-creating a clean build environment from scratch doesn't help. The builds
>>> are exactly the same ones that I used to put out the 1.0.3 version at the
>>> end of February - and it all worked then. See
>>> https://github.com/nigelsmall/py2neo/issues/487 for the GitHub issue.
>>>
>>> These versions all work:
>>> CentOS centos7
>>> CentOS6
>>> openSUSE 13.2
>>> openSUSE 42.1
>>> Ubuntu trusty
>>> Ubuntu vivid
>>> Ubuntu wily
>>> Debian jessie
>>> Fedora 21
>>> Fedora 22
>>>
>>>
>>> Here's the error from Ubuntu precise:
>>>
>>> Step 14 : RUN *pip install ctypesgen 'py2neo>2.0.7' getent*
>>> ---> Running in 6a80194d49c4
>>> Downloading/unpacking ctypesgen
>>>  Running setup.py egg_info for package ctypesgen
>>>
>>> Downloading/unpacking py2neo>2.0.7
>>>  Running setup.py egg_info for package py2neo
>>>Traceback (most recent call last):
>>>  File "", line 14, in 
>>>  File "/build/py2neo/setup.py", line 26, in 
>>>from py2neo import __author__, __email__, __license__,
>>> __package__, __version__
>>>  File "py2neo/__init__.py", line 28, in 
>>>from py2neo.database import *
>>>  File "py2neo/database/__init__.py", line 26, in 
>>>from py2neo.database.cypher import cypher_escape, cypher_repr
>>>  File "py2neo/database/cypher.py", line 24, in 
>>>from py2neo.types import Node, Relationship, Path
>>>  File "py2neo/types.py", line 23, in 
>>>from py2neo.database.http import Resource
>>>  File "py2neo/database/http.py", line 20, in 
>>>from py2neo.database.auth import ServerAddress, keyring
>>>  File "py2neo/database/auth.py", line 22, in 
>>>from py2neo.packages.neo4j.v1 import basic_auth
>>>  File "py2neo/packages/neo4j/v1/__init__.py", line 22, in 
>>>from .session import *
>>>  File "py2neo/packages/neo4j/v1/session.py", line 32, in 
>>>from ssl import SSLContext, PROTOCOL_SSLv23, OP_NO_SSLv2,
>>> CERT_REQUIRED
>>>*ImportError:* *cannot import name SSLContext*
>>>
>>>
>>> --
>>>
>>> Alan Robertson / CTO
>>> al...@assimilationsystems.com / +1 303.947.7999
>>>
>>> Assimilation Systems Limited
>>> http://AssimilationSystems.com
>>>
>>> [image: Twitter]  [image: Linkedin]
>>>  [image: skype]
>>> 
>>>
>>> --
>>> 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] Re: "Waiting for all transactions to close"

2015-09-06 Thread Nigel Small
Batches should never be reused and a new one will need to be created for
each unit of work. Also, *run* does not spot exceptions, unlike *execute*
since it does not decode the output from the server (including exceptions).
This makes it slightly faster but it a tradeoff against using *execute*.

On 6 September 2015 at 02:33,  wrote:

> After hours spent on trying to troubleshoot the problem, it seems the
> issue comes from the BatchWrite class provided by py2neo.
> For now, it seems that crreating a new instance of BatchWrite at each
> iteration of the process and calling run() method instead of submit() may
> help to solve the problem.
> The problem with this "solution" is that run() doesn't seem to propagate
> exceptions. :(
> Investigation in progress...
>
>
>
> --
> 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] need py2neo introspection on query results

2015-08-16 Thread Nigel Small
The *RecordList* returned from *cypher.execute* has a *columns* attribute
that contains this information:

 rl = graph.cypher.execute(MERGE (a:Person) RETURN a)
 rl.columns
('a',)

It looks like this has not been included in the docs though for some reason
so I'll get that added in.

On 14 August 2015 at 20:36, Alan Robertson al...@unix.sh wrote:

 Hi Nigel,

 There is an issue what has caused me grief nearly every release you've put
 out.

 When one issues a cypher stream query, there is some kind of an object
 which you return which has rows and columns. Its name has changed from time
 to time, and its structure has changed from time to time.

 But there is one thing which I need and which you have never provided in a
 way that works from release to release. As a result, I've had to do delve
 into your source code and create a series of hacks to do this for me.

 I need to know (introspect) the names of the columns in the return result
 from the query. This is a very reasonable thing to want to know. I think in
 the 2.6 releases you called it columns. Now, it appears that the only way
 to get the list of columns (labels, whatever) from the result of a query is
 to use this expression:
 row.__producer__.columns

 Pylint objects to my doing this, as it should. And I object to having to
 do this as well. Because this is at least the 3rd iteration of how one goes
 about getting the list of columns from the result of a Cypher query.

 Since I'm building an API on top of your API -- without parsing and
 understanding Cypher (which has even *more* pitfalls), of knowing what
 columns are going to come back from the query.  So, I need to introspect
 the results of the Cypher return result.

 *Could you have mercy on me and provide a stable and documented interface
 for returning the names of the columns from the result of a Cypher query?*

 Thanks!


 --

 Alan Robertson / CTO
 al...@assimilationsystems.com / +1 303.947.7999

 Assimilation Systems Limited
 http://AssimilationSystems.com

 [image: Twitter] https://twitter.com/ossalanr [image: Linkedin]
 https://www.linkedin.com/in/alanr [image: skype]
 https://htmlsig.com/skype?username=alanr_unix.sh

 --
 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] Re: py2neo and object model

2015-06-15 Thread Nigel Small
Important note: The py2neo OGM module is old and works only with legacy
indexes, not schema indexes or any other Neo4j 2.0 concepts. Therefore, if
of type refers to labels, that's why.

You have only one OGM action in the code you've shared and this is
*store.save_unique*. If you have an entry in your legacy index following
execution of this line then it has done everything it should do. If you
want a different action to take place, please clarify what that is.

Regards
Nigel

On 15 June 2015 at 13:51, Sumit Gupta sumit1...@gmail.com wrote:

 object is not of type fruit - What do you mean by that? Are you
 comparing this with ORM where you define your own Entities and every entity
 has correspnding tables?

 if yes, then please do not do that. Neo4j provides only Object Type =
 Node, Relationship, Label, Property/ Attribute.

 Thanks,
 Sumit

 On Sunday, 14 June 2015 23:33:52 UTC+5:30, Shekar Tippur wrote:



 Hello,

 I am trying to use py2neo (http://py2neo.org/2.0/ext/ogm.html).
 I am having trouble looking up a node.

 I already have a node stored. Fruit(mango)

 I am trying to add a User(Shekar) to like Fruit(mango)

 I am able to add 2 nodes but I am having trouble creating relationship.

 What is the best way to get a node given the fruit name, desrialize it to
 something that can be a added as a relation?

 - Shekar

  --
 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] Re: Working with Neo4j 2.2 using the latest Py2Neo

2015-02-05 Thread Nigel Small
Thanks Jim :-)

On 4 February 2015 at 21:59, Jim Salmons jim.salm...@softalkapple.com
wrote:

 Echoing what Nigel said, I found that all I needed to do once on the
 latest codebase was to import set_auth_token from core and then call it
 with an authorized ID -- the route I took being that I copied and pasted
 the token displayed on the home page of the default browser view, e.g.
 localhost:7474.

 py2neo, BTW and by way of public thanks to Nigel, is an awesome
 contribution to the Neo4j community in general. But I think it is
 especially useful for folks in the digital humanities and museum
 informatics domains where there is so much data flooding on-line due to
 scanning and digitization efforts around the world. There is a lot of one
 off data importing scripting to do and py2neo is awesome for that. For
 example, I'm using it to parse and import the #cidocCRM, the ISO standard
 museum Conceptual Reference Model (AKA metamodel) into Neo4j.

 Thanks, Nigel, and Gook Luck, Mahesh,
 -: Jim :-

 www.FactMiners.org


 On Wednesday, February 4, 2015 at 6:38:07 AM UTC-6, Mahesh Lal wrote:

 Hi Nigel,

 I was wondering if py2Neo 2.0.4 supports the new auth mechanism in Neo4J.

 Most of the examples that I see are related to proxy username/passwd. Am
 I missing something?

 -- Thanks and Regards
Mahesh Lal



-- 
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] Re: Am I using class Node wrong?

2015-02-05 Thread Nigel Small
Hi Mahesh

I'm not a big fan of using *super*. I'm happy to admit that's probably a
failing on my part but I find the syntax confusing and certainly not in
line with readability counts! On top of that, I've not been able to get
it working for *Node* inheritance anyway...

So, you can use this notation instead:

from py2neo import Node

 class User(Node):

 def __init__(self, user_id, username, name=):
 assert isinstance(user_id, int) and isinstance(username, str)
 Node.__init__(self, User, user_id=user_id,
 username=username,name=name)

 def name(self):
 return self[name]

 def user_id(self):
 return self[user_id]

 def username(self):
 return self[username]


This will call the *Node* constructor directly and should work!

Cheers
Nigel


On 5 February 2015 at 02:09, Mahesh Lal mahesh.2...@gmail.com wrote:

 Hi,

 I started using Py2neo recently. I like the simplicity of the Node class,
 but considering I wanted to wrap more domain object specific functionality
 around the Node object, I decided to inherit it.

 So here is what my class looks like:

 from py2neo import Node

 class User(Node):

 def __init__(self, user_id, username, name = ):
 assert isinstance(user_id, int) and isinstance(username, str)

super().__init__(User, user_id = user_id, username= username,
  name= name)


 def name(self):
 return self[name]

 def user_id(self):
 return self[user_id]

 def username(self):
 return self[username]

 I create the node using graph.create

 graph.create(User(user_id=12734, username=maheshkl, name=Mahesh Lal))

 I get the following output:

 (User graph='http://localhost:7474/db/data/' ref='node/1' *labels={'User',
 class 'super'}* properties={'user_id': 12734, 'username': 'maheshkl',
 'name': 'Mahesh Lal'},)
 The weird bit is the *labels. *How is it getting the *class 'super' *
 label?

 Apologies if this seems like a stupid question that any python programmer
 should know, but I am confused by this behaviour.

 I doesnt seem to happen when I compose the Node object within the User
 object.


 -- Thanks and Regards
Mahesh Lal



-- 
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] Re: Working with Neo4j 2.2 using the latest Py2Neo

2015-02-04 Thread Nigel Small
Hi Mahesh

The details for using py2neo with the new auth mechanism are here:

http://py2neo.org/2.0/essentials.html#authentication

Cheers
Nigel


On 4 February 2015 at 12:38, Mahesh Lal mahesh.2...@gmail.com wrote:

 Hi Nigel,

 I was wondering if py2Neo 2.0.4 supports the new auth mechanism in Neo4J.

 Most of the examples that I see are related to proxy username/passwd. Am I
 missing something?

 -- Thanks and Regards
Mahesh Lal



-- 
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] Structr on Neo4j 2.2 milestones

2015-01-23 Thread Nigel Small
Hi Axel

Great news! Do you have any specific feedback on working with 2.2? I'd be
particularly interested in your experience working with auth.

Cheers
Nigel

On 23 January 2015 at 08:28, Axel Morgner a...@morgner.de wrote:

 Hi,

 just wanted to let you know that there's a branch in the Structr repo
 named eval_neo4j_22. It's currently using Neo4j 2.2.0-M02 (was just
 updated from M01 today), and should be in sync with master feature-wise.

 Please note that there are some failing tests due to some slight changes
 in the Neo4j kernel related to the order of relationships returned from
 the Iterable collections. But as the Neo4j 2.2 branch is becoming more
 and more stable, we'll also put an increasing effort into testing and
 fixing this branch to be prepared to release a version of Structr
 supporting the 2.2 release when it comes out.

 You can of course use it for testing and evaluating 2.2 anyway, feedback
 always welcome!

 Cheers,
 Axel

 --
 Axel Morgner · CEO Structr (c/o Morgner UG) · Twitter @amorgner · Skype
 axel.morgner
 Hanauer Landstr. 291a · 60314 Frankfurt, Germany · Phone +49 151 40522060
 https://structr.org - Structr: A revolutionary software based on Neo4j
 https://structr.com - Structr and Neo4j Hos


 --
 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] Re: Script to migrate relational DB to Neo4j

2014-12-04 Thread Nigel Small
Looks awesome. I'll give it a spin over the next few days :-)

On 4 December 2014 at 21:20, Michael Hunger 
michael.hun...@neotechnology.com wrote:

 Yannis,

 This is amazing, I have to still test it out, but really good work.

 One thing I'd love to see is a blog post + screencast that shows the tool
 in action. Probably on the northwind database.

 You already implemented all the features I was thinking of for a similar
 tool in java.

 Something that would be really cool is to do the same just from a set of
 sql insert statements so that you actually don't need a running relational
 database but you can do dump.sql - csv files - import.cypher

 Cheers, Michael

 On Thu, Dec 4, 2014 at 9:54 PM, feng zhu feng.zhu1...@gmail.com wrote:

 Thanks! It's great work

 在 2014年12月4日星期四UTC-8上午6时16分45秒,Ioannis Theodossis写道:

 Hi,

 I came across Neo4j and, as I wanted to have data from some familiar
 database to see it in action, I ended up developing, in my free time, a
 script in Python to do the job.

 https://github.com/lycofron/pysql2neo4j

 Mind that this is not meant to be The Solution. It's just a script to
 get you up and running quickly.

 As I am quite new in Neo4j, I'd like to hear from you: bugs,
 suggestions, whether you found it useful (or not) etc.

 Thank you,
 Yannis.

  --
 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] Re: What is your technology stack?

2014-11-25 Thread Nigel Small
I use Debian and Ubuntu based distros generally. Specifically, my current
preference for desktop OS is Linux Mint Debian Edition - I've leaned
slightly away from Ubuntu over the past few years. For servers, both Debian
and Ubuntu are good choices although, again, I ususally now err towards the
former.

Nigel

On 25 November 2014 at 08:11, Andrii Stesin ste...@gmail.com wrote:

 After 1/2 year of experiments, we've completely switched to Ubuntu Linux
 14.04. I recommend it. And no windows at all.

 --
 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] Re: Optimizing the shortest path query in a large graph (py2neo)

2014-11-23 Thread Nigel Small
Following on from Michael's reply: in py2neo 1.6, you can pass parameters
like this:

query = neo4j.CypherQuery(
graph_db,
MATCH (m:Page {node:'{*n1*}'}), (n:Page {node:'{*n2*}'}),
p = shortestPath((m)-[*..20]-(n)) RETURN p
)
query.execute(*n1*=node1, *n2*=node2)

In py2neo 2.0, this will instead be:

graph_db.cypher.execute(
MATCH (m:Page {node:'{*n1*}'}), (n:Page {node:'{*n2*}'}),
p = shortestPath((m)-[*..20]-(n)) RETURN p,
{*n1*: node1, *n2*: node2}
)

Nigel

On 23 November 2014 at 21:09, Michael Hunger 
michael.hun...@neotechnology.com wrote:

 After adding the constraint / index, did you also change your query to
 include the :Page label?

 CREATE CONSTRAINT ON (p:Page) ASSERT p.node IS UNIQUE;

 query = neo4j.CypherQuery(
 graph_db,
 MATCH (m:Page {node:'%s'}), (n:Page {node:'%s'}), p = 
 shortestPath((m)-[*..20]-(n)) RETURN p % (node1, node2)
 )

 Also I recommend not to use string substitution but cypher parameters

 MATCH (m:Page {node:{node1}}), (n:Page {node:{node2}})

 and then pass a dictionary with {'node1':node1, 'node2':node2}


 On Sun, Nov 23, 2014 at 6:37 PM, Erika Arnold era...@gmail.com wrote:


 Thank you for your suggestions. The database is about 5.5G on disk.

 I turned off auto indexing and applied the constraint on node id, but saw
 no discernible difference in response time. Perhaps the culprit is the
 pathfinding algorithm?

 When I ask for the shortest path between two nodes that I know are
 directly connected, why does the query take the same amount of time as for
 a path with 5 connections? Shouldn't it stop as soon as it finds node2 in
 the list of linked pages for node1?

 Additionally, even after placing the database on a memory-optimized EC2
 server with 15G RAM, the query still takes 30 seconds. It doesn't appear to
 be at max memory or CPU usage.

 I'm baffled at what to optimize next.

 --
 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] Retrieving large-ish groups of nodes

2014-10-13 Thread Nigel Small
Hi Aru

Firstly, as a side note, the issue to which you link highlights a problem
with the deb/rpm packages for some versions of Neo4j. The tarballs are fine
and py2neo is definitely compatible with all versions from 1.8 upwards.

Now to your main question

Neo4j is optimised for efficient graph traversal but, in your case, you are
not really using any of this capability. You are instead attempting to
fetch a set of unconnected nodes based on a single property so, whichever
way you spin it, it's not really a graphy query. This query is in fact
much more the kind of one you'd ask an RMDBS and so I think this is more a
problem with data modelling than with the query language itself.

So, one option would be to rework your data model a little to add some
(more) relationships. As I don't know much about your data model or the
criteria for ETL selection, it's hard to say exactly what might be useful
in your case. But, if you can group or segment your entity nodes then you
can probably reduce the amount of data scanned by each run of your
extraction query. Your query might then look something like this:

MATCH (g:EntityGroup)-[:MEMBER]-(n:Entity)
WHERE n.uid IN [uid001, uid002 ... uid500]
AND g.group_name IN [widgets, things]
RETURN n ORDER BY ID(n) ASC

This kind of approach would then only search a subset of your graph data
and should speed up the query. Of course, if your extraction criteria are
arbitrary or very variable then this option may be less viable.

Incidentally, you are ordering by ID(n) in the return clause. I'd generally
recommend against using entity IDs within any part of your domain logic as
they are an internal artifact and may not always operate as you'd expect.

Nigel


On 13 October 2014 22:33, Aru Sahni arusa...@gmail.com wrote:

 Hi,

 Disclaimer: I'm using Neo4j 2.0.3. I know that this is far from the most
 recent version, but a bug between the latest stable py2neo and 2.1.x
 builds have me stuck on this release
 https://groups.google.com/forum/#!topic/neo4j/-eqzLPxk0DI.

 I'm writing an ETL script that needs to retrieve around 500 nodes per
 request.  My nodes have a `uid` field that is indexed and has a
 uniqueness constraint.

 :Entity(uid)

 To get these nodes, I'm issuing the following query:

 MATCH (n:Entity)
 WHERE n.uid IN [uid001, uid002 ... uid500]
 RETURN n ORDER BY ID(n) ASC;

 This takes quite a bit of time. Running this with the profiler indicates
 that it's hitting the database for every filter.  Attempting to unroll this
 (i.e. `WHERE n.uid = uid001 OR n.uid = uid002`, etc) hits the
 database just as heavily. If I try to specify the index with the USING
 statement, I get the following error:

 IndexHintException: Cannot use index hint in this context. Index hints
 require using a simple equality comparison in WHERE (either directly or as
 part of a top-level AND).


 What I find ends up working is:

 MATCH (n:Entity) WHERE n.uid = uid001 RETURN n
 UNION ALL
 MATCH (n:Entity) WHERE n.uid = uid002 RETURN n
 ...
 MATCH (n:Entity) WHERE n.uid = uid500 RETURN n

 This is a little too verbose and hacky for my tastes. I was wondering if
 there's anything I can do to improve the performance and reduce the
 complexity of this query.

 Regards,
 ~Aru

 --
 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] Setting up Neo4J on arch linux

2014-10-08 Thread Nigel Small
Hi Jared

I've been considering setting up an Arch VM recently as I've been reading
very good things about it. I managed to get Neo4j working on FreeBSD the
other day so Arch should be simple in comparison :-)

Arch is set up a little differently to Debian/Ubuntu - which are our usual
go to distros - so there will almost certainly be a bit of tweaking
required. I'll try to get something installed over the next couple of days
and get back to you.

Cheers
Nige
On 8 Oct 2014 15:51, Jared Windover jaredwindo...@gmail.com wrote:

 Hi Michael,

 I'm able to run that, but what should I be doing to check where the issue
 is? Nothing seems to go wrong with running it. Are there diagnostics I can
 do within it?
 (Also sorry about the delay. I thought I was subscribed to this post, but
 apparently not)

 -Jared

 On Sunday, October 5, 2014 6:19:32 PM UTC-4, Michael Hunger wrote:

 can you try to run: bin/neo4j console

 to see where the issue is?

 Thanks Michael

 On Sun, Oct 5, 2014 at 11:37 PM, Jared Windover jaredw...@gmail.com
 wrote:

 Hi guys,

 I've installed neo4j with pacman and am able to run the web console,
 however when I try to just start the server (either with neo4j start or
 systemctl start neo4j.service) it says it failed to start within the
 timeout period, but it doesn't wait for the full timeout period. Looking at
 the scripts, it looks like it's having trouble with su-ing as the
 $NEO4J_USER. I'm a programmer, but I don't have much experience with server
 config type things, so any help at all would be appreciated.

 Thanks.

 --
 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+un...@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] nested maps

2014-10-04 Thread Nigel Small
Hi Michael

Just read through this thread.

We probably need to make this much clearer on the ref cards. IMHO they do
seem quite misleading on the usage of map literals.

Think I might put forward some alternative wording next week to clarify.

Nige
On 4 Oct 2014 21:09, Michael Hunger michael.hun...@neotechnology.com
wrote:

 Nested maps are supported as constructs in cypher and expression results,
 return values but not in the underlying Neo4j storage.

 On Sat, Oct 4, 2014 at 8:38 PM, brian blevine...@gmail.com wrote:

 Note that this also doesn't work in Neo4j 2.1.5 even though the Cypher
 refcard says that nested maps are supported.  When I try this query, I get
 the error: Neo.ClientError.Statement.InvalidType  Property values can
 only be of primitive types or arrays thereof


 On Sunday, March 16, 2014 6:10:57 AM UTC-4, Marco Ippolito wrote:

 Hi Michael,

 is this the reason why with neo4j 2.01 the query taken from here:
 http://docs.neo4j.org/refcard/2.0/
 MERGE (p:person {name:'Alice', age:38, address:{city:'London',
 residential:true}}) RETURN p;
 doesn't work?

 Error Message:
 Map(city - London, residential - true) (of class
 scala.collection.immutable.Map$Map2)
  Neo.DatabaseError.Statement.ExecutionFailure

 Marco

 On Wednesday, 12 February 2014 11:43:36 UTC+1, Michael Hunger wrote:

 Maps and nested collections/arrays are not supported (yet) as property
 values.

 Cheers,

 Michael

 On Mon, Feb 10, 2014 at 11:32 PM,  loo...@gmail.com wrote:
  Hi,
 
  shouldn't nested maps work within a CREATE statement ???
 
  E.g.:
 
  CREATE (:ANV {
  a:'a',
  b:{
  c:['c'],
  d:'d',
  e:'e',
  f:'f',
  g: {h:'h'},
  h:'h'
  }});
 
 
  results in
 
  Map(e - e, f - f, g - Map(h - h), c - List(c), h - h, d - d)
 (of
  class scala.collection.immutable.HashMap$HashTrieMap)
 
  Neo.DatabaseError.Statement.ExecutionFailure
 
 
  ???
 
  --
  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+un...@googlegroups.com.
  For more options, visit https://groups.google.com/groups/opt_out.

  --
 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] org.neo4j.graphdb.NotFoundException

2014-09-16 Thread Nigel Small
Hi

Can you provide details of what code you are running when this error is
triggered?

Cheers
Nigel

On 16 September 2014 06:11, sunyulovet...@gmail.com wrote:

 Hi,

 I am using neo4j 1.9.7,SDN 2.2.0.RELEASE and haproxy 1.4.24 to run the
 environment. I have 6 server,1 master and 5 slavers .Write to the all
 server.
 Now I always get these exception:

 org.springframework.dao.DataRetrievalFailureException: 3189664; nested
 exception is org.neo4j.graphdb.NotFoundException: 3189664
 org.springframework.dao.DataRetrievalFailureException: 3189664; nested
 exception is org.neo4j.graphdb.NotFoundException: 3189664
 at
 org.springframework.data.neo4j.support.Neo4jExceptionTranslator.translateExceptionIfPossible(Neo4jExceptionTranslator.java:59)
 at
 org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:58)
 at
 org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:213)
 at
 org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:163)
 at
 org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
 at
 org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
 at com.sun.proxy.$Proxy46.findById(Unknown Source)
 at sun.reflect.GeneratedMethodAccessor226.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at
 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)
 at
 org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:196)
 at com.sun.proxy.$Proxy47.findById(Unknown Source)
 at
 cn.gaialine.talkage2.service.tcardManager.impl.tcardManagerServiceImpl.tcardPraise(tcardManagerServiceImpl.java:676)

 at
 cn.gaialine.talkage2.controller.TcardManagerController.tcardPraise(TcardManagerController.java:579)
 at sun.reflect.GeneratedMethodAccessor225.invoke(Unknown Source)
 at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at
 org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
 at
 org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
 at
 org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
 at
 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
 at
 org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
 at
 org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
 at
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
 at
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
 at
 org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
 at
 org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
 at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:698)
 at
 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1506)
 at
 org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
 at
 org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
 at
 org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1486)
 at
 org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
 at
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138)
 at
 org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:540)
 at
 org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213)
 at
 org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1096)
 at
 org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:432)
 at
 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175)
 at
 org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1030)
 at
 org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136)
 at
 org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:201)
 at
 

Re: [Neo4j] Can we convert neo4j output into JPEG or any other

2014-08-04 Thread Nigel Small
If you want a picture of a graph then the simplest option is to use the
browser application and take a screenshot using the PrtSc button (or
whatever your operating system's method for this is).

Nigel
On 4 Aug 2014 08:13, Pavan Kumar kumar.pavan...@gmail.com wrote:

 Hello.

 I want to convert output of neo4j into any of the format JPEG/PNG.
 can any body suggest how to convert.
 Thanks in Advance

 --
 Thanks  Regards,
 Pavan Kumar

 --
 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] Execute cypher query from shell on Linux

2014-08-02 Thread Nigel Small
Hi Alex

You can install py2neo which contains neotool, a command line tool that
should do exactly what you're looking for.

If you have pip (python packager) installed, just run pip install py2neo
and it will be downloaded and set up.

Hope this helps
Nigel
On 2 Aug 2014 08:56, Alex winter winter110...@gmail.com wrote:

 Hi
 I installed database on Linux server via ssh.
 I have a list query and I want to test the performance.
 I can run the query from neo4j shell. But I want to write the result (time
 of running query )to text file because I have many query+want to compare it
 later.

  --
 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] Re: Can't use python interface. Can't build gremlin plugin.

2014-07-30 Thread Nigel Small
Thanks Aru :-)


On 30 July 2014 15:00, Aru Sahni arusa...@gmail.com wrote:

 Is there any specific reason you're using bulbs/Gremlin? I'd really
 recommend you check out py2neo - Nigel's done a great job with it.

 That being said, here's the process I've used to build Gremlin when I was
 first getting start - this needs to be run on your neo4j server. *I
 haven't tested it with neo4j 2.1.x*.

 $ git clone https://github.com/neo4j-contrib/gremlin-plugin.git
 $ cd gremlin-plugin
 $ neo4j stop
 $ mvn clean package
  $ unzip target/neo4j-gremlin-plugin-2.0-SNAPSHOT-server-plugin.zip -d
 $NEO4J_HOME/plugins/gremlin-plugin
 $ neo4j start
 $ curl http://localhost:7474/db/data/ext/GremlinPlugin # Will return with
 an exception if the plugin wasn't installed successfully

 HTH,
 ~A


 On Wed, Jul 30, 2014 at 1:02 AM, Daniel Brami daniel.br...@gmail.com
 wrote:

 Hey Darren - I too have been struggling with getting bulbs and neo4j to
 work.
 Even installed the tinkerpop3 stack but still no luck - i must be doing
 something wrong...
 Did you get it working?

 On Sunday, November 10, 2013 7:02:23 AM UTC-8, Darren Govoni wrote:

 Hi,
  I am trying to use the python bulbs interface to Neo4j, here is a
 snippet:

  from bulbs.neo4jserver import Graph
  g = Graph()
  james = g.vertices.create(name=James)
 Traceback (most recent call last):
   File stdin, line 1, in module
   File /usr/local/lib/python2.7/dist-packages/bulbs/element.py, line
 565, in create
 resp = self.client.create_vertex(data)
   File /usr/local/lib/python2.7/dist-packages/bulbs/
 neo4jserver/client.py, line 424, in create_vertex
 return self.create_indexed_vertex(data, index_name, keys=None)
   File /usr/local/lib/python2.7/dist-packages/bulbs/
 neo4jserver/client.py, line 1027, in create_indexed_vertex
 return self.gremlin(script,params)
   File /usr/local/lib/python2.7/dist-packages/bulbs/
 neo4jserver/client.py, line 384, in gremlin
 return self.request.post(path, params)
   File /usr/local/lib/python2.7/dist-packages/bulbs/rest.py, line 128,
 in post
 return self.request(POST, path, params)
   File /usr/local/lib/python2.7/dist-packages/bulbs/rest.py, line 183,
 in request
 return self.response_class(http_resp, self.config)
   File /usr/local/lib/python2.7/dist-packages/bulbs/
 neo4jserver/client.py, line 217, in __init__
 self.handle_response(response)
   File /usr/local/lib/python2.7/dist-packages/bulbs/
 neo4jserver/client.py, line 249, in handle_response
 response_handler(response)
   File /usr/local/lib/python2.7/dist-packages/bulbs/rest.py, line 39,
 in not_found
 raise LookupError(http_resp)
 LookupError: ({'status': '404', 'content-length': '794', 'content-type': 
 'application/json;
 charset=UTF-8', 'access-control-allow-origin': '*', 'server':
 'Jetty(6.1.25)'}, '{\n  message : No such ServerPlugin:
 \\GremlinPlugin\\,\n  exception : PluginLookupException,\n
  fullname : org.neo4j.server.plugins.PluginLookupException,\n
  stacktrace : [ 
 org.neo4j.server.plugins.PluginManager.extension(PluginManager.java:124),
 org.neo4j.server.plugins.PluginManager.invoke(PluginManager.java:165),
 org.neo4j.server.rest.web.ExtensionService.
 invokeGraphDatabaseExtension(ExtensionService.java:322),
 org.neo4j.server.rest.web.ExtensionService.
 invokeGraphDatabaseExtension(ExtensionService.java:144),
 java.lang.reflect.Method.invoke(Method.java:606),
 org.neo4j.server.rest.transactional.TransactionalRequestDispatcher
 .dispatch(TransactionalRequestDispatcher.java:132),
 org.neo4j.server.rest.security.SecurityFilter.
 doFilter(SecurityFilter.java:112) ]\n}')
 


 So I read that the gremlin plugin is annoyingly not part of neo4j server
 that seems to need it. I then clone the gremlin plugin project.
 It does not build.

 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '
 6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote = 'html
 headtitle301' - RETRYING
 Downloading: http://maven.glassfish.org/content/groups/glassfish/net/
 java/jvnet-parent/1/jvnet-parent-1.pom
 185b downloaded  (jvnet-parent-1.pom)
 [WARNING] *** CHECKSUM FAILED - Checksum failed on download: local = '
 6c9fd3d150b8a5f0ca676f49b8ed603793cabebb'; remote = 'html
 headtitle301' - IGNORING
 [INFO] 
 
 [ERROR] BUILD ERROR
 [INFO] 
 
 [INFO] Error building POM (may not be this project's POM).




 Project ID: com.sun.jersey:jersey-project:pom:1.9


 Reason: Cannot find parent: net.java:jvnet-parent for project:
 com.sun.jersey:jersey-project:pom:1.9 for project
 com.sun.jersey:jersey-project:pom:1.9


 What to do here? Help appreciated.

  --
 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 

Re: [Neo4j] Re: py2neo 1.6.4 doesn't work with Neo4j 2.1.2 - Cannot find node...

2014-07-17 Thread Nigel Small
Cool, thanks. I should get a chance to look into it over the next couple of
weeks.

Cheers
Nigel


On 17 July 2014 22:41, Alan Robertson al...@unix.sh wrote:

  And for good measure, if you use the Dockerfile quoted below (and
 attached), this is a clean-room reproduction of the problem in CentOS6
 (with Python 2.7).

 ###
 FROM centos:latest
 # Would prefer headless, but not available in CentOS6
 RUN yum -y install wget java-1.7.0-openjdk scl-utils redhat-lsb-core
 RUN wget -qO- http://dev.centos.org/centos/6/SCL/scl.repo 
 /etc/yum.repos.d/centos.scl.repo
 RUN yum -y install python27-python python27-python-setuptools
 ###  Neo4j RPM
 RUN wget http://debian.neo4j.org/neotechnology.gpg.key -O /tmp/neo4j.key
  rpm --import /tmp/neo4j.key  rm -f /tmp/neo4j.key
 RUN echo '[neo4j]'  /etc/yum.repos.d/neo4j.repo  echo 'name=Neo4j Yum
 Repo'  /etc/yum.repos.d/neo4j.repo  echo 'baseurl=http://yum.neo4j.org'
  /etc/yum.repos.d/neo4j.repo  echo 'enabled=1' 
 /etc/yum.repos.d/neo4j.repo  echo 'gpgcheck=1' 
 /etc/yum.repos.d/neo4j.repo  yum -y install neo4j
 RUN scl enable python27 'easy_install pip'
 RUN scl enable python27 'pip install py2neo'
 RUN echo Pulling Assimilation project source
 RUN mkdir /tmp/neotest  cd /tmp/neotest  wget -q
 http://hg.linux-ha.org/assimilation/raw-file/tip/cma/store.py   wget -q
 http://hg.linux-ha.org/assimilation/raw-file/tip/cma/assimevent.py
 RUN NEO=neo4j; cd /tmp/neotest  /etc/init.d/${NEO} start  sleep 15 
 scl enable python27 '/usr/bin/env python --version; python store.py'
 ##

 Do this:
 make a directory
 cd into the directory you just made
 copy the above text into a file in that directory - named Dockerfile
 docker.io build .

 This is a completely clean-room demonstration of the problem in CentOS6.



 On 07/17/2014 08:16 AM, Alan Robertson wrote:

 Hi Nigel,

 Many thanks for your quick reply!

 I can reproduce it with what I think is a smallish environment.

 If you download my code from here:
 http://hg.linux-ha.org/assimilation/archive/tip.tar.gz

 Untar it, and go into the cma directory.  Run the python script *store.py*

 It will fail.  Each time you run it, it will give a higher node in the
 graph that it cannot find.

 If it doesn't fail, then we can try the docker thing to reproduce the
 environment more exactly.

 To try the docker version, you just need to install docker and say docker
 build . (or docker.io) with my Dockerfile in your directory.  It will do
 the rest - grab the OS, libraries, things we need, build my code and run my
 tests.  It just takes longer.  For this environment, it helps to understand
 docker when you want to debug it.

 It's pretty awesome.  But hopefully you won't need to do that.

 I also have a more complex set of tests that only require python that will
 likely fail if there's a Neo4j/Py2neo issue that affects me.  Maybe I
 should create a separate test environment for that - that you could easily
 run.




 On 07/15/2014 04:42 PM, Nigel Small wrote:

 Familiar with the concept but have never actually used it.


 On 15 July 2014 23:41, Alan Robertson al...@unix.sh wrote:

  Yes.  There are lots of ways to do that.  After all, it's all open
 source :-D.

 Are you familiar with docker?



 On 07/15/2014 04:19 PM, Nigel Small wrote:

 Can you share some code that I can run to recreate the issue?

 Cheers
 Nigel


 On 15 July 2014 23:09, Alan Robertson al...@unix.sh wrote:

 Neo4j package: neo4j-2.1.2-1.noarch

 # pip list | grep py2neo
 py2neo (1.6.4)

 The context is this:
 I just did a commit of a transaction which added nodes to the database,
 and am now trying to retrieve these same nodes by the ids for them which
 were returned by the transaction.


 tests.cma_test TestCMABasic.test_several_startups ... error:
 tests.cma_test TestCMABasic.test_several_startups
 Traceback (most recent call last):
   File ./tests/cma_test.py, line 506, in test_several_startups
 CMAinit(io, cleanoutdb=True, debug=DEBUG)
   File ./cmainit.py, line 75, in __init__
 CMAdb.store.commit()
   File ./store.py, line 912, in commit
 for attr in newnode.get_properties():
   File
 /opt/rh/python27/root/usr/lib64/python2.7/site-packages/py2neo/neo4j.py,
 line 1398, in get_properties
 self._properties = assembled(self._properties_resource._get()) or {}
   File
 /opt/rh/python27/root/usr/lib64/python2.7/site-packages/py2neo/neo4j.py,
 line 367, in _get
 raise ClientError(e)
 ClientError: Cannot find node with id [0] in database.

 ERROR in 2.49s
 tests.cma_test TestCMABasic.test_startup ... error: tests.cma_test
 TestCMABasic.test_startup
 Traceback (most recent call last):
   File ./tests/cma_test.py, line 433, in test_startup
 CMAinit(io, cleanoutdb=True, debug=DEBUG)
   File ./cmainit.py, line 75, in __init__
 CMAdb.store.commit()
   File ./store.py, line 912, in commit
 for attr in newnode.get_properties():
   File
 /opt

Re: [Neo4j] Do you know how to clear cache in Neo4j?

2014-07-14 Thread Nigel Small
I think Michael's question was more to ask why there is value in measuring
uncached performance at all. In production, caches are typically in play
and so the performance statistics for warm caches are far more useful for
comparison purposes.

Nigel
On 14 Jul 2014 11:27, jean caca cacaj...@gmail.com wrote:

 He just told you why.

 I'd be interested in knowing how to clear that cache as well, for the same
 purposes.

 Thanks,
 Jean

 Le vendredi 8 février 2013 15:35:41 UTC-8, Michael Hunger a écrit :

 Why would you want to clear the cache?

 Cold / uncached performance is not what you aim for in production
 settings.

 Michael

 Am 08.02.2013 um 22:00 schrieb i28...@gmail.com:

 Hi~~~

 I have done some test for benchmarking purposes in Neo4j.

 But, I got some different result because I didn't remove(clear) cache.

 So, I have found a method about flushing cache
 http://lists.neo4j.org/pipermail/user/2010-December/006049.html;

 However, it is old version.

 To clear cache, what should I do?

 Thanks a lot

 --
 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+un...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




  --
 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] py2neo with Geospatial index

2014-06-25 Thread Nigel Small
Hi Ankur

I'm afraid that py2neo does not support spatial at this point in time. I
may consider adding it in a future version though so watch this space!

Regards
Nigel
On 25 Jun 2014 07:25, Ankur goel ankug...@gmail.com wrote:

 Does Py2neo in python supports creating Geo-spatial Indexes.
 If yes, Can someone demonstrate it using a working sample which creates
 and then searches nearby POI query

 --
 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] Large scale network analysis - best strategy?

2014-06-18 Thread Nigel Small
Hi Gareth

All of py2neo's features use the Neo4j REST interface, both for Cypher and
for its other functions. The main difference concerns where the application
logic exists: on the server or on the client.

With Cypher, all the logic is encapsulated within the language itself and
will be processed server-side; this is generally pretty fast. While some
optimisations exist for the other functions, the logic will generally occur
on the client and one or more calls will need to be made to the server on
each step; you will have slightly more control with this method but it will
generally be slower.

Assuming performance is your priority, I would therefore recommend using
Cypher wherever possible and only resorting to other functions if you
really need to.

Hope this helps
Nigel

PS: glad you had some success with py2neo :-)
On 18 Jun 2014 13:44, Shongololo garethsim...@gmail.com wrote:

 Hi Nigel,

 Out of curiosity - it appears that your py2neo works quite seamlessly with
 Cypher by using the append / execute / commit steps. (I actually ended up
 loading in my data using py2neo's Cypher module.) I would appreciate your
 take on py2neo's Cypher implementation vs. py2neo's non-Cypher
 implementation for speed and flexibility? (It appears that the Cypher
 module has a method Record for capturing query results?)

 Thanks,
 Gareth

 On Tuesday, June 17, 2014 11:04:53 PM UTC+1, Nigel Small wrote:

 Hi Gareth

 As you identify, there are certainly some differences in terms of
 performance and feature set that you get when working with Neo4j under
 different programming languages. Depending on your background, constraints
 and integration needs, you could consider a hybrid approach whereby you
 continue working with Python for your main application and build anything
 that requires serious performance as a server extension in Java. Neo4j
 plugin support is pretty comprehensive: for example, my server extension
 load2neo http://nigelsmall.com/load2neo provides a facility to bulk
 load data but also has direct support from my Python driver, py2neo
 http://py2neo.org/. This approach is somewhat analogous to compiling a
 C extension in Python and could be done as an optimisation step once you
 have built your end-to-end application logic.

 Bear in mind also that Cypher is very powerful these days. It would
 certainly be worth exploring some of its more recent capabilities before
 choosing an architectural path as you may find there is little that cannot
 already be achieved purely with Cypher. If this is the case, your choice of
 application language could then become far less critical.

 I'd suggest beginning with a prototype in a language you are comfortable
 with. Then, build a suite of queries you need to run and ascertain the
 bottlenecks or missing features. Once you have a list of these, you can
 then make an informed decision on which pieces to optimise.

 Kind regards
 Nigel


 On 17 June 2014 15:42, Shongololo gareth...@gmail.com wrote:

 I am preparing a Neo4j database on which I would like to do some network
 analysis. It is a representation of a weakly connected and static physical
 system, and will have in the region of 50 million nodes where, lets say,
 about 50 nodes will connect to a parent node, which in turn is linked
 (think streets and intersections) to a network of other parent nodes.

 For most of the analysis, I will be using a weighted distance decay, so
 analysis of things like betweenness or centrality will be computed for
 the parent node network, but only to a limited extent. So, for example, if
 (a)--(b)--(c)--(d)--(e), then the computation will only be based up to,
 say, two steps away. So (a) will consider (b) and (c), whereas (c) will
 consider two steps in either direction.

 My question is a conceptual and strategic one: What is the best approach
 for doing this kind of analysis with neo4j?

 I currently work with Python, but it appears that for speed,
 flexibility, and use of complex graph algorithms, I am better off working
 with the embedded Java API for direct and powerful access to the graph? Or
 is an approach using something like bulb flow with gremlin also feasible?
 How does the power and flexibility of the different embedded tools compare
 - e.g. Python embedded vs. Java vs. Node.js?

 Thanks.

  --
 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+un...@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

Re: [Neo4j] Large scale network analysis - best strategy?

2014-06-17 Thread Nigel Small
Hi Gareth

As you identify, there are certainly some differences in terms of
performance and feature set that you get when working with Neo4j under
different programming languages. Depending on your background, constraints
and integration needs, you could consider a hybrid approach whereby you
continue working with Python for your main application and build anything
that requires serious performance as a server extension in Java. Neo4j
plugin support is pretty comprehensive: for example, my server extension
load2neo http://nigelsmall.com/load2neo provides a facility to bulk load
data but also has direct support from my Python driver, py2neo
http://py2neo.org/. This approach is somewhat analogous to compiling a C
extension in Python and could be done as an optimisation step once you have
built your end-to-end application logic.

Bear in mind also that Cypher is very powerful these days. It would
certainly be worth exploring some of its more recent capabilities before
choosing an architectural path as you may find there is little that cannot
already be achieved purely with Cypher. If this is the case, your choice of
application language could then become far less critical.

I'd suggest beginning with a prototype in a language you are comfortable
with. Then, build a suite of queries you need to run and ascertain the
bottlenecks or missing features. Once you have a list of these, you can
then make an informed decision on which pieces to optimise.

Kind regards
Nigel


On 17 June 2014 15:42, Shongololo garethsim...@gmail.com wrote:

 I am preparing a Neo4j database on which I would like to do some network
 analysis. It is a representation of a weakly connected and static physical
 system, and will have in the region of 50 million nodes where, lets say,
 about 50 nodes will connect to a parent node, which in turn is linked
 (think streets and intersections) to a network of other parent nodes.

 For most of the analysis, I will be using a weighted distance decay, so
 analysis of things like betweenness or centrality will be computed for
 the parent node network, but only to a limited extent. So, for example, if
 (a)--(b)--(c)--(d)--(e), then the computation will only be based up to,
 say, two steps away. So (a) will consider (b) and (c), whereas (c) will
 consider two steps in either direction.

 My question is a conceptual and strategic one: What is the best approach
 for doing this kind of analysis with neo4j?

 I currently work with Python, but it appears that for speed, flexibility,
 and use of complex graph algorithms, I am better off working with the
 embedded Java API for direct and powerful access to the graph? Or is an
 approach using something like bulb flow with gremlin also feasible? How
 does the power and flexibility of the different embedded tools compare -
 e.g. Python embedded vs. Java vs. Node.js?

 Thanks.

  --
 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] py2neo working in read-only mode

2014-05-21 Thread Nigel Small
Michael's guess is correct, there is a bug in the *Session.execute* method:

https://github.com/nigelsmall/py2neo/blob/feature/bindable/py2neo/cypher.py#L153

Here, the call should be made to *commit* instead of *execute*.

I suggest that you use the longer form of *append* and *commit* until this
bug is fixed. Examples can be seen on this page:

http://book.py2neo.org/en/latest/cypher/

Nigel


On 21 May 2014 14:15, Александр Богданов lanakramo...@gmail.com wrote:

 I'm sorry, but I cant understand what logs you mean?
 It's web application.
 In neo4j folder i can't see any requests log. Where to find it? o-o

 Thank you.

 среда, 21 мая 2014 г., 16:22:31 UTC+4 пользователь Michael Hunger написал:

 Not sure how py2neo does it internally with these statements, but I think
 you still have to commit your query.

 According to the docs it commits immediately, but perhaps there is a bug,
 so that the node goes away after tx-timeout?

 Could you produce an http log of the http requests between your python
 client and the server including responses and http requests and response
 headers?

 Thanks




 On Wed, May 21, 2014 at 1:59 PM, Александр Богданов 
 lanakr...@gmail.comwrote:

 Dump!

 All is really stopped without correct working of this... QQ

 понедельник, 19 мая 2014 г., 21:48:43 UTC+4 пользователь Александр
 Богданов написал:

 Sure it's local.

 look what happen:

 1. graph before query: http://i.gyazo.com/85df
 bc3152117cd50334085b9b9254b5.png
 2. running example script: http://i.gyazo.com/034
 27e0161a3168cbc62915ab1d5ffb9.png
 3. graph after query (new node selected. can see that it is not
 correct): http://i.gyazo.com/84c62a9a39eca3e7d3dec3fe5dd623ff.png

 after several minutes gray node disappear

 понедельник, 19 мая 2014 г., 21:01:42 UTC+4 пользователь Nigel Small
 написал:

 Bear in mind that the identifier 'n' is local to that query only and
 will not automagically find the node called 'n' in the previous create
 statement. You will need to match by ID or some other indexed criteria.
 On 19 May 2014 17:10, Александр Богданов lanakr...@gmail.com
 wrote:

 I tried with RETURN. It returns Node. Correct node. But no node in
 database.
 Interesting fact. When I trying to find this node using browser *MATCH
 n WHERE ID(n)=11880* (id from return) it finds one node. But node is
 without any property or label and colored lightgrey. But no such node in
 answer on *MATCH n RETURN n. *And after restarting Neo4j even
 looking with ID unsuccessful.

 понедельник, 19 мая 2014 г., 19:55:15 UTC+4 пользователь Nigel Small
 написал:

 You won't see any return values from your Cypher unless you include
 a RETURN n clause at the end of your statement. This is probably your
 problem here.

 On a side note, I'd strongly advise again that you do not use %
 substitution and use Cypher parameters instead. You will hit problems 
 with
 unescaped characters at some point otherwise.

 Nige


 On 19 May 2014 16:45, Александр Богданов lanakr...@gmail.comwrote:

 *query(CREATE (n:person {name:'%s', nickname:'%s', md5:'%s'}) %
 (name, nickname, hashlib.md5(password).hexdigest()))*

 query() definition:

 *class CypherQuery:*
 *def __init__(self, service):*
 *self.session = cypher.Session(service)*
 *def cypher_q(self, input, count=1):*
 *if count == 1:*
 *return [x.values[0] for x in
 self.session.execute(input)]*
 *else:*
 *return [x.values for x in self.session.execute(input)]
*

 *CQ = CypherQuery('http://localhost:7474 http://localhost:7474')*
 *query = CQ.cypher_q*


 понедельник, 19 мая 2014 г., 18:26:55 UTC+4 пользователь Nigel
 Small написал:

 Could you post a section of Python code that includes a CREATE
 statement that fails for you?

 Incidentally, you would be better off using Cypher parameters
 (passed in the *execute* method) than the Python level %
 substitution you have here. This will improve both performance and
 reliability with odd characters. On this subject, do your properties
 contain ' marks? This could be breaking the query.

 Nige


 On 19 May 2014 15:04, Александр Богданов lanakr...@gmail.comwrote:

 *CREATE (n:person {name:'%s', nickname:'%s', md5:'%s'})*
 %s - strings

 воскресенье, 18 мая 2014 г., 15:39:45 UTC+4 пользователь Michael
 Hunger написал:

 Can you show your delete and create statements?

 You should probably also use parameters for your id *WHERE
 ID(p)={id}*


 On Sat, May 17, 2014 at 3:31 PM, Александр Богданов 
 lanakr...@gmail.com wrote:

 Hello.

 Problems with writing to database from python script.

 Opening session:
 *self.session = cypher.Session(http://localhost:7474
 http://localhost:7474)*

 query like this:
  *self.session.execute(MATCH (p:person)-[:has_a_role]-(role)
 WHERE ID(p)=%d RETURN role.role) *
 working well. I receiving all information i need.

 but if i trying to create node or delete it doesnt work.
 no errors
 even correct node in return of execute() function if i trying
 to create

Re: [Neo4j] Survey: which language do you use? (python, java, etc)

2014-05-21 Thread Nigel Small
There are language drivers available for most major programming languages
(mine is the Python one):

http://www.neo4j.org/develop/drivers

In terms of choosing a language, Java wins if you are looking for raw
performance - although that is becoming less of an issue as Cypher
improves. It can also be useful to write server plugins in Java which can
be exposed over REST and can therefore be buddied with code written in
other languages.

Nige


On 21 May 2014 15:32, Alex Frieden a...@frieden.org wrote:

 In general for neo4j I would stick to java.  Embedded API is written in
 it, tons of web UIs written in it(RoR, grails, SDN), and the jdbc driver is
 very friendly for java (not sure if there is a python equivalent)


 On Wed, May 21, 2014 at 10:12 AM, chrismichael...@gmail.com wrote:

 I'm new to the community and to graph databases, but I am finding it all
 very useful. I was wondering, however, what most people use to actually
 access the databases?

 This is NOT a which language is best question, and I am not talking
 about query language (cypher, gremlin, oSQL). I mean java, python, php, etc?

 Also, do you use an OGM or ORM or anything like that?

 I'll start: I use PHP for my web applications, and am currently working
 on an adapted driver for RexPro to add support for a Query Builder and OGM
 written in PHP.

 Cheers!

  --
 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.




 --
 Alexander Frieden

  --
 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] py2neo working in read-only mode

2014-05-19 Thread Nigel Small
Bear in mind that the identifier 'n' is local to that query only and will
not automagically find the node called 'n' in the previous create
statement. You will need to match by ID or some other indexed criteria.
On 19 May 2014 17:10, Александр Богданов lanakramo...@gmail.com wrote:

 I tried with RETURN. It returns Node. Correct node. But no node in
 database.
 Interesting fact. When I trying to find this node using browser *MATCH n
 WHERE ID(n)=11880* (id from return) it finds one node. But node is
 without any property or label and colored lightgrey. But no such node in
 answer on *MATCH n RETURN n. *And after restarting Neo4j even looking
 with ID unsuccessful.

 понедельник, 19 мая 2014 г., 19:55:15 UTC+4 пользователь Nigel Small
 написал:

 You won't see any return values from your Cypher unless you include a
 RETURN n clause at the end of your statement. This is probably your
 problem here.

 On a side note, I'd strongly advise again that you do not use %
 substitution and use Cypher parameters instead. You will hit problems with
 unescaped characters at some point otherwise.

 Nige


 On 19 May 2014 16:45, Александр Богданов lanakr...@gmail.com wrote:

 *query(CREATE (n:person {name:'%s', nickname:'%s', md5:'%s'}) % (name,
 nickname, hashlib.md5(password).hexdigest()))*

 query() definition:

 *class CypherQuery:*
 *def __init__(self, service):*
 *self.session = cypher.Session(service)*
 *def cypher_q(self, input, count=1):*
 *if count == 1:*
 *return [x.values[0] for x in self.session.execute(input)]*
 *else:*
 *return [x.values for x in self.session.execute(input)]*

 *CQ = CypherQuery('http://localhost:7474 http://localhost:7474')*
 *query = CQ.cypher_q*


 понедельник, 19 мая 2014 г., 18:26:55 UTC+4 пользователь Nigel Small
 написал:

 Could you post a section of Python code that includes a CREATE
 statement that fails for you?

 Incidentally, you would be better off using Cypher parameters (passed
 in the *execute* method) than the Python level % substitution you have
 here. This will improve both performance and reliability with odd
 characters. On this subject, do your properties contain ' marks? This could
 be breaking the query.

 Nige


 On 19 May 2014 15:04, Александр Богданов lanakr...@gmail.com wrote:

 *CREATE (n:person {name:'%s', nickname:'%s', md5:'%s'})*
 %s - strings

 воскресенье, 18 мая 2014 г., 15:39:45 UTC+4 пользователь Michael
 Hunger написал:

 Can you show your delete and create statements?

 You should probably also use parameters for your id *WHERE
 ID(p)={id}*


 On Sat, May 17, 2014 at 3:31 PM, Александр Богданов 
 lanakr...@gmail.com wrote:

 Hello.

 Problems with writing to database from python script.

 Opening session:
 *self.session = cypher.Session(http://localhost:7474
 http://localhost:7474)*

 query like this:
 *self.session.execute(MATCH (p:person)-[:has_a_role]-(role) WHERE
 ID(p)=%d RETURN role.role) *
 working well. I receiving all information i need.

 but if i trying to create node or delete it doesnt work.
 no errors
 even correct node in return of execute() function if i trying to
 create it. but no such node in response on query like 
 *self.session.execute(MATCH
 (n) RETURN n)*
 and in http://127.0.0.1:7474/browser/ no such node too. but if i
 trying in browser - it creates.

 something with configuration? why can't i correctly use
 write-queries with *py2neo.cypher.Session.execute()* ?

 PS: Sorry for my english and thank you.

 --
 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+un...@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+un...@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+un...@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] Intermittent Unknown Identifier Error

2014-05-02 Thread Nigel Small
We've been seeing similar (intermittent) errors for some time but as yet
have been unable to build a standalone piece of code that reliably
generates the error.

One workaround I have tried is to ensure all nodes and relationships in a
query have an explicit identifier, e.g. dummy1, dummy2 and so on. Though
it's hard to even prove whether or not this helps.

Incidentally, I have seen such UNNAMED errors in both 1.9 and 2.0.

Cheers
Nige
On 2 May 2014 09:21, Yu Gene Loh yug...@gmail.com wrote:

 Same results on community versions of 2.0.1 and 2.1.0-M01.


 On Thursday, May 1, 2014 8:39:12 PM UTC+8, Michael Hunger wrote:

 Can you please share the versions you are using?


 Am 01.05.2014 um 11:03 schrieb Yu Gene Loh yug...@gmail.com:

 Some queries are returning intermittent InvalidSyntax (Unknown
 identifier) errors, even though they work most of the time and return
 correct results without any errors.

 Can anyone shed some light? Thanks!


 gene.



 The query…
 MATCH (d:Workgroup), (b:Activity),
 (d)-[:ACTIVITY_OF]-(b)-[r:ASSET_INPUT_OF|ASSET_OUTPUT_OF]-(a:Asset)-[:
 ASSET_TYPE_OF]-(aa:AssetType)

 WHERE aa.name IN ['Document']

 OPTIONAL MATCH (:Activity)-[subs:SUBSCRIBED_BY]-(a)

 OPTIONAL MATCH (a)-[sel:SELECTED_BY]-(:Person {username: 'testuser'})

 OPTIONAL MATCH (a)-[:BELONGS_TO]-(dd:Workgroup)

 RETURN ID(b), ID(a), a.name,

 CASE TYPE(r)

 WHEN 'ASSET_INPUT_OF' THEN 'Input'

 WHEN 'ASSET_OUTPUT_OF' THEN 'Output'

 END AS inputoutput,

 a.category, a.owner, a.location, aa.name, COUNT(subs), COUNT(sel), d.code
 + ' ' + ID(b) + '/A' + ID(a) as asset_code, COLLECT(dd.code) + a.owner
 AS owner ORDER BY ID(a);


 sometimes returns the following error…


 Unknown identifier `d`.
 Unknown identifier `  UNNAMED8428111205143288671`.
 Unknown identifier `  UNNAMED-1827321063839507775`.
 Unknown identifier `  INTERNAL_AGGREGATE478402e2-
 0455-48f0-a95f-29c36c56a8d6`.
 Unknown identifier `  INTERNAL_AGGREGATE71e3c595-
 93c6-4a57-a4b3-3a02b2143747`.
 Unknown identifier `  UNNAMED7958746158675052802`.
 Unknown identifier `  UNNAMED2430603467466026493`.
 Unknown identifier `  UNNAMED6198074590133770465`.
 Unknown identifier `  UNNAMED-2526645446754961735`.
 Unknown identifier `  UNNAMED-6102135876980975330`.
 Unknown identifier `  UNNAMED-8703169606424011663`.
 Unknown identifier `  INTERNAL_AGGREGATE69db5735-
 293e-4bf1-adce-dd084c69c741`.

 Neo.ClientError.Statement.InvalidSyntax




 --
 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+un...@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] Re: BadStatusLine with py2neo on CentOS6.4

2014-04-05 Thread Nigel Small
You must move in different server circles to me as I see far more Ubuntu
boxes than anything else :-)

As always, though, I'm happy to review pull requests on py2neo to fix
issues for the operating system(s) you're using.

Cheers
Nige


On 5 April 2014 23:33, Alan Robertson al...@unix.sh wrote:

  It's worth noting that RHEL6 is probably the most popular Linux server
 out there, and RHEL7 isn't out yet...

 I appreciate the difficulty, and I don't want to support it either.
 Unfortunately, as a practical matter, it seems that it's not something I'll
 likely be able to avoid...




 On 04/05/2014 03:41 PM, Nigel Small wrote:

 Hi Alan

  A *BadStatusLine* is generally an indication that the remote server has
 disconnected, normally due to a timeout. Py2neo will usually retry when it
 sees one of these but the handling isn't bullet-proof and may not work at
 all under Python 2.6. I don't know about Red Hat either - maybe it provides
 different versions of Python across those two OS's - would be worth
 checking.

  As a related side note, although the vast majority of the code will work
 with 2.6 as it stands right now, I'm not supporting Python 2.6 at all going
 forward - only 2.7 and 3.3.

  Cheers
 Nigel


 On 5 April 2014 21:24, Alan Robertson al...@unix.sh wrote:

  Hi,

 When I run my tests on CentOS6.4 (python 2.6) I get a BadStatusLine
 error.  When I run them on CentOS 6.5, they run fine.

 The code is just asking what version of Neo4j we have - and it fails...
 This is about the first thing I do with it.  The stack traceback is below:


  fail: tests.cma_test TestCMABasic.test_several_startups
 Traceback (most recent call last):
   File ./tests/cma_test.py, line 550, in test_several_startups
 CMAinit(io, cleanoutdb=True, debug=DEBUG)


   File ./cmainit.py, line 60, in __init__
 self.delete_all()
   File ./cmainit.py, line 91, in delete_all
 dbvers = *self.db.neo4j_version*
   File /usr/lib/python2.6/site-packages/py2neo/neo4j.py, line 798, in 
 neo4j_version


 return version_tuple(self.__metadata__[neo4j_version])
   File /usr/lib/python2.6/site-packages/py2neo/neo4j.py, line 338, in 
 __metadata__
 self.refresh()


   File /usr/lib/python2.6/site-packages/py2neo/neo4j.py, line 360, in 
 refresh
 self._metadata = ResourceMetadata(self._get().content)
   File /usr/lib/python
  2.6/site-
 packages/py2neo/neo4j.py, line 365, in _get
 product=self._product)
   File 
 /usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py, line 
 803, in get
 return rq.submit(redirect_limit=redirect_limit, **kwargs)


   File 
 /usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py, line 
 388, in submit
 http, rs = submit(self.method, uri, self.body, headers)
   File 
 /usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py, line 
 288, in submit


 response = send()
   File 
 /usr/lib/python2.6/site-packages/py2neo/packages/httpstream/http.py, line
  284, in s
 end
 return http.getresponse()
   File /usr/lib64/python2.6/httplib.py, line 990, in getresponse
 response.begin()
   File /usr/lib64/python2.6/httplib.py, line 391, in begin


 version, status, reason = self._read_status()
   File /usr/lib64/python2.6/httplib.py, line 355, in _read_status
 raise BadStatusLine(line)
 BadStatusLine



  What's up with this?  Working with RHEL6 seems to be a really good
 idea...

  --
 Alan Robertson al...@unix.sh al...@unix.sh - @OSSAlanR

 Openness is the foundation and preservative of friendship...  Let me claim 
 from you at all times your undisguised opinions. - William Wilberforce




 --
 Alan Robertson al...@unix.sh al...@unix.sh - @OSSAlanR

 Openness is the foundation and preservative of friendship...  Let me claim 
 from you at all times your undisguised opinions. - William Wilberforce



-- 
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] Re: py2neo 1.6.4 breaks my code again...

2014-03-23 Thread Nigel Small
I am unfamiliar with Docker but a cursory glance at the project suggests
that it may impose environmental conditions that were not anticipated when
I wrote py2neo. I would be happy to review a pull request with any fixes
you are able to provide for this setup.

Nigel


On 23 March 2014 05:43, Alan Robertson al...@unix.sh wrote:

 This was a clean install on CENTOS 6 under Docker. Thanks for the
 explanation.


 On March 22, 2014 11:40:49 AM MDT, Nigel Small ni...@nigelsmall.com
 wrote:

 The Record.columns attribute is accessible in both 1.6.3 and 1.6.4
 identically. Documentation is limited in a few areas, I'll admit, but that
 is largely due to a lack of time to work on the project.

 I see no such issue with installing py2neo 1.6.3:

 $ pip install py2neo==1.6.3
 Downloading/unpacking py2neo==1.6.3
   Downloading py2neo-1.6.3.tar.gz (216kB): 216kB downloaded
   Running setup.py (path:/home/elgin/venv/test/build/py2neo/setup.py)
 egg_info for package py2neo

 Installing collected packages: py2neo
   Running setup.py install for py2neo
 building 'py2neo.packages.jsonstream.cjsonstream_2x' extension
 gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall
 -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c
 py2neo/packages/jsonstream/cjsonstream_2x.c -o
 build/temp.linux-x86_64-2.7/py2neo/packages/jsonstream/cjsonstream_2x.o
 gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions
 -Wl,-Bsymbolic-functions -Wl,-z,relro
 build/temp.linux-x86_64-2.7/py2neo/packages/jsonstream/cjsonstream_2x.o -o
 build/lib.linux-x86_64-2.7/py2neo/packages/jsonstream/cjsonstream_2x.so
 changing mode of build/scripts-2.7/neotool from 644 to 755

 changing mode of /home/elgin/venv/test/bin/neotool to 755
 Successfully installed py2neo
 Cleaning up...

 I can only assume there must be something non-standard about your
 environment.

 Nigel


 On 22 March 2014 13:46, Alan Robertson al...@unix.sh wrote:

  You changed the access to columns - and I didn't see any column
 attribute like there is now.  It could be that I missed it before.  In any
 case, I'm now using it, and would love it if it would stay around.

 But since there is no documentation of this particular data structure,
 it wasn't clear how one was supposed to use it.

 Regarding pip: specifying ==1.6.3 does NOT work - it gives me 1.6.4
 anyway.  I have no idea why.  It knows I wanted 1.6.3, but it said
 installing 1.6.4 instead or something like that.



 On 3/22/2014 5:04 AM, Nigel Small wrote:

 Hi Alan

  I'm unclear as to how your code might be broken based on the 1.6.4
 release. In terms of query results, there were some internal optimisations
 that were carried out to improve performance but nothing should have
 changed in the public API. If you can be clearer on what you perceive has
 changed, I can either clarify correct usage or add a bug to be fixed.

  Version 1.6.3 has not been removed either, as per standard pip usage,
 you can install that specific version by using:

  pip install py2neo==1.6.3

  Nigel


 On 21 March 2014 22:32, Alan Robertson al...@unix.sh wrote:

 Hi Nigel,

 When you return query results, you've had 3 different versions of how to
 introspect the column names of the resulting data (1.6.4 being the
 latest one).

 Could you *please* create a consistent method for me to use to extract
 the column names and then keep that working on your new versions?
 [Having it be an object method would be awesome].

 I really need to know the column names so I can create corresponding
 columns with Python objects of the same names as the Neo4j objects you
 deliver to me.

 If you could do this, it would be very helpful for me, and would
 eliminate the last two reasons I got extremely frustrated with py2neo.

 Of course, this is made more frustrating by the fact that 1.6.3 is not
 longer available.

 If you feel the need to break APIs, it would be good to allow the old
 version to stay around for those who haven't converted to the new
 version yet.


 --
 Alan Robertson al...@unix.sh al...@unix.sh - @OSSAlanR

 Openness is the foundation and preservative of friendship...  Let me
 claim from you at all times your undisguised opinions. - William
 Wilberforce





 --
 Sent from my Android device with K-9 Mail. Please excuse my brevity.


-- 
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] Re: py2neo 1.6.4 breaks my code again...

2014-03-22 Thread Nigel Small
Hi Alan

I'm unclear as to how your code might be broken based on the 1.6.4 release.
In terms of query results, there were some internal optimisations that were
carried out to improve performance but nothing should have changed in the
public API. If you can be clearer on what you perceive has changed, I can
either clarify correct usage or add a bug to be fixed.

Version 1.6.3 has not been removed either, as per standard pip usage, you
can install that specific version by using:

pip install py2neo==1.6.3

Nigel


On 21 March 2014 22:32, Alan Robertson al...@unix.sh wrote:

 Hi Nigel,

 When you return query results, you've had 3 different versions of how to
 introspect the column names of the resulting data (1.6.4 being the
 latest one).

 Could you *please* create a consistent method for me to use to extract
 the column names and then keep that working on your new versions?
 [Having it be an object method would be awesome].

 I really need to know the column names so I can create corresponding
 columns with Python objects of the same names as the Neo4j objects you
 deliver to me.

 If you could do this, it would be very helpful for me, and would
 eliminate the last two reasons I got extremely frustrated with py2neo.

 Of course, this is made more frustrating by the fact that 1.6.3 is not
 longer available.

 If you feel the need to break APIs, it would be good to allow the old
 version to stay around for those who haven't converted to the new
 version yet.


 --
 Alan Robertson al...@unix.sh - @OSSAlanR

 Openness is the foundation and preservative of friendship...  Let me
 claim from you at all times your undisguised opinions. - William
 Wilberforce


-- 
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] Generally about Graphs

2014-03-07 Thread Nigel Small
Hi Mohan

I'm entirely self-taught computing-wise and knew nothing about graph theory
before starting to play with Neo4j almost three years ago. So don't worry
too much, you'll pick it up :-)

There are some excellent videos/slides by Jim Webber and Ian Robinson
floating around the Intertubes that will give you a great introduction - so
it'll be worth Googling for them. There's also some training on the Neo web
site that might help:

http://www.neo4j.org/learn/online_course

Cheers
Nige


On 7 March 2014 14:54, Mohan Radhakrishnan radhakrishnan.mo...@gmail.comwrote:

 Hi,
I have tried some Neo4J samples from the perspective of Java and
 simple graphs. But I don't have a CS background. How much of graph theory
 does one needs to know before using Neo4J for serious development ? One
 answer could be that a relational model didn't require math knowledge.

 What do the forum members read or watch ?

 Thanks,
 Mohan

 --
 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] Bulk import using load2neo produces 500 server error

2014-02-24 Thread Nigel Small
It may be that you're hitting a memory issue - I've certainly never thrown
anything that big at it. Have you tried increasing the size of your JVM?


On 25 February 2014 00:49, t.kluse...@gmail.com wrote:

 Hey guys, I'm trying to import a rather large dataset in the Geoff format
 into Neo4j. The file containing the graph data is about 1.3 GB and defines
 more than 4 million nodes and 8 million relationships. I'm able to import
 files that are about 1 MB in size using load2neo. However, for the large
 file, the POST request to the load2neo server extension produces a 500
 server error. As far as I know, I can't split the file into smaller chunks
 because relationships and the nodes comprising them have to be defined in
 the same file for load2neo. I would appreciate your suggestions on dealing
 with this issue.

 Thank you.

 --
 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/groups/opt_out.


-- 
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/groups/opt_out.


Re: [Neo4j] delete all query hangs Neo4j server

2014-02-07 Thread Nigel Small
If it's any help, I've recently added a bulk delete facility to my load2neo
extension:

http://nigelsmall.com/load2neo#bulk-delete

This does a core-API-level deletion of all nodes and relationships so is
generally the fastest method available. Useful for unit tests, etc :-)

Cheers
Nige


On 6 February 2014 16:16, brian blevine...@gmail.com wrote:

 Never mind.  This is my bug.  I added some of my own REST endpoints via a
 plugin and I wasn't terminating the transaction correctly during certain
 error conditions.

 -brian

 On Thursday, February 6, 2014 11:00:55 AM UTC-5, Michael Hunger wrote:

 How many nodes do you have or did you have in your graph.

 Perhaps you have to batch the deletes.

 MATCH (n)

LIMIT 1

 OPTIONAL MATCH (n)-[r]-() DELETE n, r



 Michael

 Am 06.02.2014 um 16:40 schrieb brian blevi...@gmail.com:

 Environment:
   - Neo4j 2.0
   - Oracle JDK 1.7
   - OS X 10.9
   - Node 0.10.21

 I have a number of unit tests which exercise Neo4j via the REST API.
 Before each test, the database is cleared using the following query:

 MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n, r

 This works fine for a while and then the Neo4j server becomes
 unresponsive for this query.  When the query is issued, there is no
 response from the server and my test eventually times out.  Once the server
 is in this state, I can also issue this query from the Neo4j browser.
  After a long delay, the browser shows an Unknown Error message.  I can
 issue other queries successfully, but the delete all query continues to
 time out or error out until I restart the server.  There is nothing in the
 neo4j.0.0.log or console.log that indicates any problem.

 Any idea how I can debug this?


 --
 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+un...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.


  --
 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/groups/opt_out.


-- 
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/groups/opt_out.


Re: [Neo4j] delete all query hangs Neo4j server

2014-02-07 Thread Nigel Small
Nice :-)


On 7 February 2014 09:57, Michael Hunger
michael.hun...@neopersistence.comwrote:

 Also the in memory server that I put together a while ago is useful for
 testing

 https://github.com/jexp/neo4j-in-memory-server

 Sent from mobile device

 Am 07.02.2014 um 10:34 schrieb Nigel Small ni...@nigelsmall.com:

 If it's any help, I've recently added a bulk delete facility to my
 load2neo extension:

 http://nigelsmall.com/load2neo#bulk-delete

 This does a core-API-level deletion of all nodes and relationships so is
 generally the fastest method available. Useful for unit tests, etc :-)

 Cheers
 Nige


 On 6 February 2014 16:16, brian blevine...@gmail.com wrote:

 Never mind.  This is my bug.  I added some of my own REST endpoints via a
 plugin and I wasn't terminating the transaction correctly during certain
 error conditions.

 -brian

 On Thursday, February 6, 2014 11:00:55 AM UTC-5, Michael Hunger wrote:

 How many nodes do you have or did you have in your graph.

 Perhaps you have to batch the deletes.

 MATCH (n)

LIMIT 1

 OPTIONAL MATCH (n)-[r]-() DELETE n, r



 Michael

 Am 06.02.2014 um 16:40 schrieb brian blevi...@gmail.com:

 Environment:
   - Neo4j 2.0
   - Oracle JDK 1.7
   - OS X 10.9
   - Node 0.10.21

 I have a number of unit tests which exercise Neo4j via the REST API.
 Before each test, the database is cleared using the following query:

 MATCH (n) OPTIONAL MATCH (n)-[r]-() DELETE n, r

 This works fine for a while and then the Neo4j server becomes
 unresponsive for this query.  When the query is issued, there is no
 response from the server and my test eventually times out.  Once the server
 is in this state, I can also issue this query from the Neo4j browser.
  After a long delay, the browser shows an Unknown Error message.  I can
 issue other queries successfully, but the delete all query continues to
 time out or error out until I restart the server.  There is nothing in the
 neo4j.0.0.log or console.log that indicates any problem.

 Any idea how I can debug this?


 --
 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+un...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.


  --
 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/groups/opt_out.


  --
 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/groups/opt_out.

  --
 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/groups/opt_out.


-- 
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/groups/opt_out.


[Neo4j] REST Transactions, locking and isolation

2014-02-03 Thread Nigel Small
Hi all

We're starting to look in more detail at the new Cypher transaction
endpoint in Neo4j 2.0. The docs state that transactions operate with write
locks http://docs.neo4j.org/chunked/stable/transactions-locking.html and
that the default isolation level is READ
COMMITTEDhttp://docs.neo4j.org/chunked/stable/transactions-isolation.html.
Given that neither locks nor isolation levels are supported over REST,
we're uncertain how best to handle a situation where two concurrent
transactions attempt to both read and write the same property value.

As an example, let's assume that we want to make a deposit into a bank
account with an initial balance of zero. Each client thread carries out the
following sequence of actions:

BEGIN
EXECUTE: *MATCH (a:Account {no:123456}) SET a.balance = a.balance + 20
RETURN a.balance*
COMMIT

If these are carried out in series and one commits before the other starts,
then all works as expected and a total of 40 is deposited into the account.
If however, these operate concurrently, we can get a situation like this:

BEGIN 1
BEGIN 2
EXECUTE 1: *MATCH (a:Account {no:123456}) SET a.balance = a.balance + 20
RETURN a.balance*
EXECUTE 2: *MATCH (a:Account {no:123456}) SET a.balance = a.balance + 20
RETURN a.balance*
COMMIT 1
COMMIT 2

In this case, the second update overwrites the first and we end up losing
one of the deposits. From investigation with the core API, my understanding
is that both statements create a write lock on the node and the *read* part
of the SET statement executes but the *write* part blocks until this lock
is released. Therefore, both statements end up adding 20 to a balance of
zero instead of to the value of the property after the write lock has been
released.

All of which means that there is the potential for some every unexpected
behaviour when using REST transactions. In the core API, it is of course
possible to manually create a read lock on the node preventing this from
happening. Should this facility somehow be added to the REST API? Another -
slightly more specific - solution could be the introduction of an atomic +=
operator. Although this might not help in all such cases.

Thoughts and feedback very welcome. And I'm happy to be told that I've
missed something obvious :-)

Nige

-- 
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/groups/opt_out.


Re: [Neo4j] Content encoding

2014-01-28 Thread Nigel Small
Yes, looks like that to me too. Good spot. Can someone from Neo confirm?


On 28 January 2014 14:35, Georg Summer georg.sum...@gmail.com wrote:

 Sorry for dragging this post up but I think Neo4j 2.0 has the same problem
 on the transaction rest endpoint

 curl -v -X POST http://localhost:7474/db/data/transaction
 * About to connect() to localhost port 7474 (#0)
 *   Trying 127.0.0.1...
 * Adding handle: conn: 0x100824000
 * Adding handle: send: 0
 * Adding handle: recv: 0
 * Curl_addHandleToPipeline: length: 1
 * - Conn 0 (0x100824000) send_pipe: 1, recv_pipe: 0
 * Connected to localhost (127.0.0.1) port 7474 (#0)
  POST /db/data/transaction HTTP/1.1
  User-Agent: curl/7.32.0
  Host: localhost:7474
  Accept: */*
 
  HTTP/1.1 201 Created
  Location: http://localhost:7474/db/data/transaction/17
  Content-Encoding: UTF-8
  Content-Type: application/json
  Access-Control-Allow-Origin: *
  Transfer-Encoding: chunked
 * Server Jetty(9.0.5.v20130815) is not blacklisted
  Server: Jetty(9.0.5.v20130815)
 
 * Connection #0 to host localhost left intact
 {commit:http://localhost:7474/db/data/transaction/17/commit,results:[],transaction:{expires:Tue,
 28 Jan 2014 14:31:20 +},errors:[]}


 On Monday, 15 July 2013 21:48:06 UTC+2, Nigel Small wrote:

 No problem. To address a number of issues, I've rebuilt the entire
 HTTP/REST layer for py2neo and wrapped it up in a separate project (
 https://github.com/nigelsmall/httpstream). This attempts to detect the
 correct encoding and automatically decode the content on the fly. This was
 the only reason I spotted it :-)

 Nige


 On 15 July 2013 17:44, Jim Webber j...@neotechnology.com wrote:

 Hey Nige,

 It'll be in the 1.9.2 release which, CI gods willing, will be out
 tomorrow. Thanks for spotting it.

 Jim

 On 15 Jul 2013, at 15:48, Nigel Small ni...@nigelsmall.com wrote:

  That was quick! Thanks Peter :-)
 
 
  On 15 July 2013 15:30, Peter Neubauer peter.n...@neotechnology.com
 wrote:
  Thanks Nige for reporting, seems it's fixed now.
 
 
  Cheers,
 
  /peter neubauer
 
  G:  neubauer.peter
  S:  peter.neubauer
  P:  +46 704 106975
  L:   http://www.linkedin.com/in/neubauer
  T:   @peterneubauer
 
  Kids in Malmö this summer?- http://www.kidscraft.se
  Neo4j questions? Use GraphGist. - http://gist.neo4j.org
 
 
  On Sat, Jul 13, 2013 at 1:29 PM, Nigel Small ni...@nigelsmall.com
 wrote:
  Hi chaps
 
  After spending an hour or so this morning trying to hunt down the
 source of a Unicode problem, I've identified that there is a small HTTP
 header issue that I've raised here:
 
  https://github.com/neo4j/neo4j/issues/961
 
  To work around this, I'm going to adjust py2neo's default character
 set to be UTF-8 and ignore the headers. Are there any circumstances under
 which this wouldn't work?
 
  Cheers
  Nige
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 

 --
 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+un...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.



  --
 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/groups/opt_out.


-- 
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/groups/opt_out.


Re: [Neo4j] Content encoding

2014-01-28 Thread Nigel Small
Reopened as https://github.com/neo4j/neo4j/issues/1872


On 28 January 2014 15:43, Nigel Small ni...@nigelsmall.com wrote:

 They should probably be checked in unit tests within the Neo4j code base.
 I'll reopen the GitHub issue.


 On 28 January 2014 15:35, Georg Summer georg.sum...@gmail.com wrote:

 On the topic of spotting:
 org.apache.http.client does the spotting.
 Caused by: org.apache.http.HttpException: Unsupported Content-Coding: UTF
 -8
 at org.apache.http.client.protocol.ResponseContentEncoding.process(
 ResponseContentEncoding.java:98)
 ...


 While I do not have the time, one could make a small program that crawls
 all URLs of an neo4j instance and checks for these exceptions.

 On Tuesday, 28 January 2014 16:03:44 UTC+1, Nigel Small wrote:

 Yes, looks like that to me too. Good spot. Can someone from Neo confirm?


 On 28 January 2014 14:35, Georg Summer georg@gmail.com wrote:

 Sorry for dragging this post up but I think Neo4j 2.0 has the same
 problem on the transaction rest endpoint

 curl -v -X POST http://localhost:7474/db/data/transaction
 * About to connect() to localhost port 7474 (#0)
 *   Trying 127.0.0.1...
 * Adding handle: conn: 0x100824000
 * Adding handle: send: 0
 * Adding handle: recv: 0
 * Curl_addHandleToPipeline: length: 1
 * - Conn 0 (0x100824000) send_pipe: 1, recv_pipe: 0
 * Connected to localhost (127.0.0.1) port 7474 (#0)
  POST /db/data/transaction HTTP/1.1
  User-Agent: curl/7.32.0
  Host: localhost:7474
  Accept: */*
 
  HTTP/1.1 201 Created
  Location: http://localhost:7474/db/data/transaction/17
  Content-Encoding: UTF-8
   Content-Type: application/json
  Access-Control-Allow-Origin: *
  Transfer-Encoding: chunked
 * Server Jetty(9.0.5.v20130815) is not blacklisted
  Server: Jetty(9.0.5.v20130815)
 
 * Connection #0 to host localhost left intact
 {commit:http://localhost:7474/db/data/transaction/17/commit
 ,results:[],transaction:{expires:Tue, 28 Jan 2014 14:31:20
 +},errors:[]}


 On Monday, 15 July 2013 21:48:06 UTC+2, Nigel Small wrote:

 No problem. To address a number of issues, I've rebuilt the entire
 HTTP/REST layer for py2neo and wrapped it up in a separate project (
 https://github.com/nigelsmall/httpstream). This attempts to detect
 the correct encoding and automatically decode the content on the fly. This
 was the only reason I spotted it :-)

 Nige


 On 15 July 2013 17:44, Jim Webber j...@neotechnology.com wrote:

 Hey Nige,

 It'll be in the 1.9.2 release which, CI gods willing, will be out
 tomorrow. Thanks for spotting it.

 Jim

 On 15 Jul 2013, at 15:48, Nigel Small ni...@nigelsmall.com wrote:

  That was quick! Thanks Peter :-)
 
 
  On 15 July 2013 15:30, Peter Neubauer peter.n...@neotechnology.com
 wrote:
  Thanks Nige for reporting, seems it's fixed now.
 
 
  Cheers,
 
  /peter neubauer
 
  G:  neubauer.peter
  S:  peter.neubauer
  P:  +46 704 106975
  L:   http://www.linkedin.com/in/neubauer
  T:   @peterneubauer
 
  Kids in Malmö this summer?- http://www.kidscraft.se
  Neo4j questions? Use GraphGist. - http://gist.neo4j.org
 
 
  On Sat, Jul 13, 2013 at 1:29 PM, Nigel Small ni...@nigelsmall.com
 wrote:
  Hi chaps
 
  After spending an hour or so this morning trying to hunt down the
 source of a Unicode problem, I've identified that there is a small HTTP
 header issue that I've raised here:
 
  https://github.com/neo4j/neo4j/issues/961
 
  To work around this, I'm going to adjust py2neo's default character
 set to be UTF-8 and ignore the headers. Are there any circumstances under
 which this wouldn't work?
 
  Cheers
  Nige
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 

 --
 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+un...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.



  --
 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+un...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out

Re: [Neo4j] Content encoding

2014-01-28 Thread Nigel Small
They should probably be checked in unit tests within the Neo4j code base.
I'll reopen the GitHub issue.


On 28 January 2014 15:35, Georg Summer georg.sum...@gmail.com wrote:

 On the topic of spotting:
 org.apache.http.client does the spotting.
 Caused by: org.apache.http.HttpException: Unsupported Content-Coding: UTF-
 8
 at org.apache.http.client.protocol.ResponseContentEncoding.process(
 ResponseContentEncoding.java:98)
 ...


 While I do not have the time, one could make a small program that crawls
 all URLs of an neo4j instance and checks for these exceptions.

 On Tuesday, 28 January 2014 16:03:44 UTC+1, Nigel Small wrote:

 Yes, looks like that to me too. Good spot. Can someone from Neo confirm?


 On 28 January 2014 14:35, Georg Summer georg@gmail.com wrote:

 Sorry for dragging this post up but I think Neo4j 2.0 has the same
 problem on the transaction rest endpoint

 curl -v -X POST http://localhost:7474/db/data/transaction
 * About to connect() to localhost port 7474 (#0)
 *   Trying 127.0.0.1...
 * Adding handle: conn: 0x100824000
 * Adding handle: send: 0
 * Adding handle: recv: 0
 * Curl_addHandleToPipeline: length: 1
 * - Conn 0 (0x100824000) send_pipe: 1, recv_pipe: 0
 * Connected to localhost (127.0.0.1) port 7474 (#0)
  POST /db/data/transaction HTTP/1.1
  User-Agent: curl/7.32.0
  Host: localhost:7474
  Accept: */*
 
  HTTP/1.1 201 Created
  Location: http://localhost:7474/db/data/transaction/17
  Content-Encoding: UTF-8
   Content-Type: application/json
  Access-Control-Allow-Origin: *
  Transfer-Encoding: chunked
 * Server Jetty(9.0.5.v20130815) is not blacklisted
  Server: Jetty(9.0.5.v20130815)
 
 * Connection #0 to host localhost left intact
 {commit:http://localhost:7474/db/data/transaction/17/commit
 ,results:[],transaction:{expires:Tue, 28 Jan 2014 14:31:20
 +},errors:[]}


 On Monday, 15 July 2013 21:48:06 UTC+2, Nigel Small wrote:

 No problem. To address a number of issues, I've rebuilt the entire
 HTTP/REST layer for py2neo and wrapped it up in a separate project (
 https://github.com/nigelsmall/httpstream). This attempts to detect the
 correct encoding and automatically decode the content on the fly. This was
 the only reason I spotted it :-)

 Nige


 On 15 July 2013 17:44, Jim Webber j...@neotechnology.com wrote:

 Hey Nige,

 It'll be in the 1.9.2 release which, CI gods willing, will be out
 tomorrow. Thanks for spotting it.

 Jim

 On 15 Jul 2013, at 15:48, Nigel Small ni...@nigelsmall.com wrote:

  That was quick! Thanks Peter :-)
 
 
  On 15 July 2013 15:30, Peter Neubauer peter.n...@neotechnology.com
 wrote:
  Thanks Nige for reporting, seems it's fixed now.
 
 
  Cheers,
 
  /peter neubauer
 
  G:  neubauer.peter
  S:  peter.neubauer
  P:  +46 704 106975
  L:   http://www.linkedin.com/in/neubauer
  T:   @peterneubauer
 
  Kids in Malmö this summer?- http://www.kidscraft.se
  Neo4j questions? Use GraphGist. - http://gist.neo4j.org
 
 
  On Sat, Jul 13, 2013 at 1:29 PM, Nigel Small ni...@nigelsmall.com
 wrote:
  Hi chaps
 
  After spending an hour or so this morning trying to hunt down the
 source of a Unicode problem, I've identified that there is a small HTTP
 header issue that I've raised here:
 
  https://github.com/neo4j/neo4j/issues/961
 
  To work around this, I'm going to adjust py2neo's default character
 set to be UTF-8 and ignore the headers. Are there any circumstances under
 which this wouldn't work?
 
  Cheers
  Nige
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 
 
 
  --
  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+un...@googlegroups.com.

  For more options, visit https://groups.google.com/groups/opt_out.
 
 

 --
 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+un...@googlegroups.com.

 For more options, visit https://groups.google.com/groups/opt_out.



  --
 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+un...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


  --
 You received this message because you are subscribed to the Google Groups
 Neo4j group.
 To unsubscribe from this group

Re: [Neo4j] Neo4jPHP too slow

2014-01-27 Thread Nigel Small
You'd have to get confirmation from Josh Adell on the details but I think
that *getProperty* will be issuing a new HTTP call each time it is called.
As you have this in a loop, that will be a lot of network traffic, causing
the slowness you have observed.

For this kind of usage, you are best to look at batches and/or Cypher
queries to minimise the amount of traffic to the server.

Cheers
Nigel


On 27 January 2014 15:14, Rajat Singh rajat123si...@gmail.com wrote:

 Today i have written first basic program for Neo4j from PHP. This was
 basically done to check out if we could use Neo4j in our new project from
 PHP by using Neo4jPhp. https://github.com/jadell/neo4jphp

 here is my code

 !DOCTYPE htmlhtmlbody
 h1My first PHP page/h1
 ?php

 include 'neo4jphp.phar';
 echo Hello World!;
 // Connecting to the default port 7474 on localhost
 $client = new Everyman\Neo4j\Client();
 $queryString =
 MATCH (n).
 RETURN n;
 $query = new Everyman\Neo4j\Cypher\Query($client, $queryString);
 $result = $query-getResultSet();

 foreach ($result as $row) {
 echo $row['n']-getProperty('name') . \n;}
 ?
 /body/html

 Now here i am just retrieving all the nodes with their property. Pretty
 simple.

 if i run this from graphical console of Neo4j, it takes 86 ms. I have only
 200 nodes and almost same property.

 match (n)return n

 Returned 50 rows in 86 ms

 If i run this from above PHP file, it takes 2-4 seconds in total to dump
 data in browser. Neo4j is running in same machine.

 Please note that i have not done any changes in the configuration of both
 PHP and Neo4j. Everything is default. Please tell me if this is the
 expected behaviour of Neo4j with PHP or something is really wrong with my
 code or configuration.

 Thanks a lot

 --
 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/groups/opt_out.


-- 
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/groups/opt_out.


Re: [Neo4j] Transactional REST API

2014-01-26 Thread Nigel Small
Hi Gorka

If it helps, have a look at the way I've presented the transactional
endpoint in py2neo:

https://github.com/nigelsmall/py2neo/blob/master/py2neo/cypher.py#L108

At the top level is a *Session* object that maintains the root URI for the
database then, from that, transactions can be created. For each
transaction, it's possible to add any number of statements and send these
to the server for execution or commit/rollback as required. The precise
REST endpoint used varies depending on the order in which executes and
commits are received.

For example:

from py2neo import cypher
session = cypher.Session(http://localhost:7474;)tx =
session.create_transaction()
# send three statements to for execution but leave the transaction
opentx.append(MERGE (a:Person {name:'Alice'}))tx.append(MERGE
(b:Person {name:'Bob'}))tx.append(CREATE UNIQUE
(a)-[:KNOWS]-(b))tx.execute()
# send another three statements and commit the
transactiontx.append(MERGE (c:Person
{name:'Carol'}))tx.append(MERGE (d:Person
{name:'Dave'}))tx.append(CREATE UNIQUE
(c)-[:KNOWS]-(d))tx.commit()

Each *execute()* or *commit()* method call will use one of four possible
URIs:

   - *BEGIN* - /db/data/transaction
   - *BEGIN_COMMIT* - /db/data/transaction/commit
   - *EXECUTE* - /db/data/transaction/{id}
   - *COMMIT* - /db/data/transaction/{id}/commit

If the transaction ID is unknown (because no calls have previously been
made) then the *execute()* method will use the *BEGIN* endpoint, otherwise
it will use *EXECUTE*. Similarly, the *commit()* method will use either
*BEGIN_COMMIT* or *COMMIT*. The actual code behind these methods is here:

https://github.com/nigelsmall/py2neo/blob/master/py2neo/cypher.py#L226

By the way, I can't claim credit for this approach. It was inspired by a
conversation with Tatham Oddie, author of the .NET driver, at GraphConnect
SF last year :-)

Cheers
Nige


On 26 January 2014 05:40, Michael Hunger
michael.hun...@neotechnology.comwrote:

 Thanks a lot for your engagement! What language / environment are you
 developing the driver for?

 This is most efficient:
 - Multiple queries directly to /transaction/commit (creating a new
 transaction each one?)

 It depends on the usage though, if decisions for the following queries are
 made based on the results of previous ones then you'll probably want to
 support multiple requests within a single tx.

 Cheers

 Michael



 On Sat, Jan 25, 2014 at 11:42 AM, Gorka Lertxundi glertxu...@gmail.comwrote:

 I started developing a neo4j client and when I reach to the transactional
 endpoint there's something i'm not sure about:

 Which is the best option regarding to multiple 'MATCH' statements? (no
 updates, no creates):
   - Multiple queries directly to /transaction/commit (creating a new
 transaction each one?)
   - Create a transaction and then do MATCHes in it /transaction/5 (do
 commit :\ after all?)

 rgds,

 --
 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/groups/opt_out.


  --
 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/groups/opt_out.


-- 
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/groups/opt_out.


Re: [Neo4j] Bulk insert with unique

2014-01-03 Thread Nigel Small
The load2neo plugin might help you (http://nigelsmall.com/load2neo). It
uses Geoff (http://nigelsmall.com/geoff) which can represent unique nodes.

Cheers
Nigel


On 3 January 2014 16:04, Michael Hunger
michael.hun...@neopersistence.comwrote:

 How much data do you want to insert?


 Am 03.01.2014 um 16:58 schrieb David Blaney davidcarterbla...@gmail.com:

 Hi,

 Is it possible, using the Java API,  to bulk insert nodes with a unique
 property name?

 I have been able to get the bulk insert and the create unique
 functionality working separately but the integration seems impossible.

 Maybe it is unsupported or I am missing something Any ideas?

 Thanks,
 David



 --
 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/groups/opt_out.


  --
 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/groups/opt_out.


-- 
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/groups/opt_out.


Re: [Neo4j] Re: (neo4j-shell)-[:connect_to]-(graphene)

2013-12-31 Thread Nigel Small
Hi Javad

I have made some adjustments to neotool (
http://book.py2neo.org/en/latest/neotool/) including a very basic shell
mode with auth support. This was specifically to help support GrapheneDB so
might be able to do what you want.

Cheers
Nigel


On 31 December 2013 17:47, Javad Karabi karabija...@gmail.com wrote:

 i guess i should elaborate...
 i need to connect to the neo4j service behind authentication, but
 neo4j-shell doesnt seem to have an option for username or password.
 does this mean neo4j-shell must be somehow wrapped in an auth mechanism?


 On Tuesday, December 31, 2013 11:38:45 AM UTC-6, Javad Karabi wrote:

 has anyone been able to connect to graphene via neo4j-shell?

  --
 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/groups/opt_out.


-- 
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/groups/opt_out.