Re: [Neo4j] How to embed neo4j to OSGI env without spring?

2011-06-14 Thread Peter Neubauer
Nicolas,
yes, after looking into the details involved, I think an "official"
superbundle with the core Neo4j components bundled and exported woudl
be the best way forward. Also, it would expose less granular bundles
into an OSGi environment.

Other IndexProviders etc could be then inserted as fragments into that bundle.

It would be absolutely fantastic if you could work on that, maybe
using the neo4j-osgi-examples as the demo project? We could then have
a packaging project there or in a "neo4j-osgi" component that does the
actual production of the superbundle.

WDYT?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Mon, Jun 13, 2011 at 11:10 AM, Nicolas Jouanin
 wrote:
> Hi Peter,
>
> As shown below, exporting the implementation package is enough to make the 
> IndexProvider registered as OSGi service (see first line of dump). Now an 
> exception comes later when registering the index. I guess this come from the 
> fact that you register a service of class IndexProvider whereas 
> db.index().forNodes() returns an instance of Index.
>
> [Framework Event Dispatcher] INFO 
> org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle 
> org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider 
> registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene]
> Kernel: attempting to load extensions of type org.neo4j.kernel.KernelExtension
> Kernel: attempting to load extensions of type 
> org.neo4j.graphdb.index.IndexProvider
> Kernel: attempting to load extensions of type org.neo4j.kernel.Version
> [Start Level Event Dispatcher] DEBUG 
> BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent REGISTERED
> [Start Level Event Dispatcher] DEBUG 
> BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent 
> UNREGISTERING
> [Framework Event Dispatcher] DEBUG 
> BuildByTinyBundlestinybundles904955895969775UID - BundleEvent STOPPED
> [Framework Event Dispatcher] DEBUG 
> BuildByTinyBundlestinybundles904955895969775UID - FrameworkEvent ERROR
> org.osgi.framework.BundleException: Exception in 
> org.neo4j.examples.osgi.Neo4jActivator.start() of bundle 
> BuildByTinyBundlestinybundles904955895969775UID.
>        at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
>        at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
>        at 
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
>        at 
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
>        at 
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
>        at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
>        at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
>        at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
>        at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
>        at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
>        at 
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
>        at 
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
> Caused by: java.lang.IllegalArgumentException: The service object is not an 
> instance of the service class org.neo4j.graphdb.index.IndexProvider
>        at 
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:201)
>        at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507)
>        at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525)
>        at org.neo4j.examples.osgi.Neo4jActivator.start(Neo4jActivator.java:43)
>        at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
>        ... 11 more
>
> Just by modifying the test case to register an Index the test now succed :
>        serviceRegistration = context.registerService( Index.class.getName(), 
> db.index().forNodes( "nodes" ), new Properties() );
>
> (see result below.

Re: [Neo4j] Does direction matter?

2011-06-14 Thread Anders Nawroth
Hi!

Thanks for the suggestion! I'll try to add such a general section to the 
manual ASAP.

/anders

2011-06-10 20:37, Aseem Kishore skrev:
> Thanks McKinley!
>
> For what it's worth, we use Neo4j only via the REST API, so I tend not to
> look at the Javadocs. It would be great to move some of this sort of
> documentation into a general Neo4j documentation area, since one would think
> to go to the Javadocs mainly only if they were using the Java API.
>
> Cheers,
> Aseem
>
> On Fri, Jun 10, 2011 at 11:32 AM, McKinley  wrote:
>
>> Aseem,
>>
>> "Even though all relationships have a direction they are equally well
>> traversed in both directions so there's no need to create duplicate
>> relationships in the opposite direction (with regard to traversal or
>> performance)."
>> http://api.neo4j.org/current/org/neo4j/graphdb/Relationship.html
>>
>> Use relationship direction to express the model and meaning. Performance
>> will be the same. Obviously, creating extra bidirectional relationships
>> could have some meaning in your model and if so, you should document it.
>> When it does not provide meaning, extra relationships can only get in the
>> way and cause confusion and perhaps hurt performance.
>>
>> Cheers,
>>
>> McKinley
>>
>> On Fri, Jun 10, 2011 at 11:06 AM, Aseem Kishore>> wrote:
>>>
>>> But does it affect *how* the stuff I can do happens? E.g. does it affect
>>> perf? If the direction is from A to B, are discoveries/fetches of B from
>> A
>>> faster than of A from B?
>>>
>>> Thanks!
>>>
>>> Aseem
>>> ___
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] How to embed neo4j to OSGI env without spring?

2011-06-14 Thread Nicolas Jouanin
I'll work on this then and i'll let you know in the coming days.

2011/6/14 Peter Neubauer 

> Nicolas,
> yes, after looking into the details involved, I think an "official"
> superbundle with the core Neo4j components bundled and exported woudl
> be the best way forward. Also, it would expose less granular bundles
> into an OSGi environment.
>
> Other IndexProviders etc could be then inserted as fragments into that
> bundle.
>
> It would be absolutely fantastic if you could work on that, maybe
> using the neo4j-osgi-examples as the demo project? We could then have
> a packaging project there or in a "neo4j-osgi" component that does the
> actual production of the superbundle.
>
> WDYT?
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Mon, Jun 13, 2011 at 11:10 AM, Nicolas Jouanin
>  wrote:
> > Hi Peter,
> >
> > As shown below, exporting the implementation package is enough to make
> the IndexProvider registered as OSGi service (see first line of dump). Now
> an exception comes later when registering the index. I guess this come from
> the fact that you register a service of class IndexProvider whereas
> db.index().forNodes() returns an instance of Index.
> >
> > [Framework Event Dispatcher] INFO
> org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle
> org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider
> registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene]
> > Kernel: attempting to load extensions of type
> org.neo4j.kernel.KernelExtension
> > Kernel: attempting to load extensions of type
> org.neo4j.graphdb.index.IndexProvider
> > Kernel: attempting to load extensions of type org.neo4j.kernel.Version
> > [Start Level Event Dispatcher] DEBUG
> BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent
> REGISTERED
> > [Start Level Event Dispatcher] DEBUG
> BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent
> UNREGISTERING
> > [Framework Event Dispatcher] DEBUG
> BuildByTinyBundlestinybundles904955895969775UID - BundleEvent STOPPED
> > [Framework Event Dispatcher] DEBUG
> BuildByTinyBundlestinybundles904955895969775UID - FrameworkEvent ERROR
> > org.osgi.framework.BundleException: Exception in
> org.neo4j.examples.osgi.Neo4jActivator.start() of bundle
> BuildByTinyBundlestinybundles904955895969775UID.
> >at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
> >at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
> >at
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
> >at
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
> >at
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
> >at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
> >at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
> >at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
> >at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
> >at
> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
> >at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
> >at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
> > Caused by: java.lang.IllegalArgumentException: The service object is not
> an instance of the service class org.neo4j.graphdb.index.IndexProvider
> >at
> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:201)
> >at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507)
> >at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525)
> >at
> org.neo4j.examples.osgi.Neo4jActivator.start(Neo4jActivator.java:43)
> >at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
> >at java.security.AccessController.doPrivileged(Native Method)
> >at
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
> >... 11 more
> >
> > Just by modifying the test case to 

Re: [Neo4j] BatchInserter improvement with 1.4M04 but still got relationship building bottleneck [was Re: Speeding up initial import of graph...]

2011-06-14 Thread Michael Hunger
Paul,

I tried to use your implementation, it added quite a high performance penalty, 
when profiling it, it consumed 3/4 of the time for the relationship creation.
The other time was spent in acquiring persistence windows for the node-store.

I also profiled the version using the simple map.

We found one issue (IdGenerator) that could benefit from the assumption that 
BatchInsertion runs single threaded.

Lots of time was spent in acquiring persistence-windows for nodes when creating 
the relationships.

My results with no batch-buffer configuration were not so bad initially but I 
sped them up tremendously by increasing the memory_buffer size for the 
node-store (so that i more often finds the
persistence-window in the cache and doesn't have to look it up.)

so, my configuration looks like this:
"neostore.nodestore.db.mapped_memory","250M",
"neostore.relationshipstore.db.mapped_memory","200M", // that 
could be also lower 50M-100M
"neostore.propertystore.db.mapped_memory","50M",
"neostore.propertystore.db.strings.mapped_memory","50M",
"neostore.propertystore.db.arrays.mapped_memory","0M"

Then I get the following (with the faster map-cache):
Physical mem: 16384MB, Heap size: 3055MB
use_memory_mapped_buffers=false
neostore.propertystore.db.index.keys.mapped_memory=1M
neostore.propertystore.db.strings.mapped_memory=50M
neostore.propertystore.db.arrays.mapped_memory=0M
neo_store=/Users/mh/java/neo/import/target/hepper/neostore
neostore.relationshipstore.db.mapped_memory=200M
neostore.propertystore.db.index.mapped_memory=1M
neostore.propertystore.db.mapped_memory=50M
dump_configuration=true
cache_type=weak
neostore.nodestore.db.mapped_memory=250M

100 nodes created. Took 2358 
200 nodes created. Took 2090 
300 nodes created. Took 2082 
400 nodes created. Took 2054 
500 nodes created. Took 2245 
600 nodes created. Took 2100 
700 nodes created. Took 2117 
800 nodes created. Took 2076 
900 nodes created. Took 2391 
1000 nodes created. Took 2214 
Creating nodes took 21
100 relationships created. Took 4302 
200 relationships created. Took 4176 
300 relationships created. Took 4260 
400 relationships created. Took 6448 
500 relationships created. Took 7645 
600 relationships created. Took 7290 
700 relationships created. Took 8627 
800 relationships created. Took 7907 
900 relationships created. Took 8292 
1000 relationships created. Took 8563 
Creating relationships took 67

>>> use_memory_mapped_buffers=false
>>> neostore.propertystore.db.index.keys.mapped_memory=1M
>>> neostore.propertystore.db.strings.mapped_memory=52M
>>> neostore.propertystore.db.arrays.mapped_memory=60M
>>> neo_store=N:\TradeModel\target\hepper\neostore
>>> neostore.relationshipstore.db.mapped_memory=76M
>>> neostore.propertystore.db.index.mapped_memory=1M
>>> neostore.propertystore.db.mapped_memory=62M
>>> dump_configuration=true
>>> cache_type=weak


Cheers

Michael

Am 13.06.2011 um 14:58 schrieb Paul Bandler:

>> can you share your test and the CompactIndex you wrote?
>> 
>> That would be great. 
> 
> See below...
> 
>> Also the memory settings (Xmx) you used for the different runs.
> 
> The heap size is displayed by neo4j is it not with console entries such as:-
> 
>>> Physical mem: 1535MB, Heap size: 1016MB
> 
> So that one came fro -Xmx1024M and 
> 
>>> Physical mem: 4096MB, Heap size: 2039MB
>> 
> 
> came from -Xms2048M
> 
> 
> regards,
> 
> Paul
> 
> 
> package com.xxx.neo4j.restore;
> 
> import java.io.ByteArrayInputStream;
> import java.io.ByteArrayOutputStream;
> import java.io.DataInputStream;
> import java.io.DataOutputStream;
> 
> public class NodeIdPair implements Comparable {
>private long_node;
>private int _id;
>static final NodeIdPair _prototype = new NodeIdPair(Long.MAX_VALUE,
>   Integer.MAX_VALUE);
>static Integer  MY_SIZE= null;
> 
>public static int size() {
>if (MY_SIZE == null) {
>MY_SIZE = (new NodeIdPair(Long.MAX_VALUE, Integer.MAX_VALUE))
>.toByteArray().length;
>System.out.println("MY_SIZE: " + MY_SIZE);
>}
>return MY_SIZE;
>}
> 
>public NodeIdPair(long node, int id) {
>_node = node;
>_id = id;
>}
> 
>public NodeIdPair(byte fromByteArray[]) {
>ByteArrayInputStream bais = new ByteArrayInputStream(fromByteArray);
>DataInputStream dis = new DataInputStream(bais);
>try {
>_node = dis.readLong();
>_id = dis.readInt();
>} catch (Exception e) {
>throw new Error("Unexpected exception. byte[] len " + 
> fromByteArray.length, e);
>}
>}
> 
>byte[] toByteArray() {
>ByteArrayOutputStream bos = new ByteArrayOutputStream(
>MY_SIZE != null ? MY_SIZE : 12);
>

Re: [Neo4j] Unexpected error

2011-06-14 Thread Johan Svensson
Hi,

Looks like there was an OOME during commit but commit partially
succeeded (removing the xid branch id association for the xa resource)
causing the subsequent rollback call to fail. To guarantee consistency
the kernel will block all mutating operations after this and a restart
+ recovery has to be performed.

To avoid this make sure you don't get OOME thrown. What cache
configuration was this on? If running on strong reference cache
(default is soft) that may be the cause. Another possible cause is
that the transaction is to large so either increase heap or split
large transactions into smaller ones.

Regards,
Johan

On Thu, Jun 9, 2011 at 10:50 AM, Massimo Lusetti  wrote:
> Hi All,
>  I'm going to give a try again to my apps on neo4j with the current
> 1.4.M03 implementations.
>
> After a while I got this stack trace for which I hope someone could
> give me a clue:
>
> org.neo4j.graphdb.TransactionFailureException: Unable to commit transaction
>        at 
> org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:104)
>        at 
> my.services.graphdb.Neo4jSourceImpl.addNodes(Neo4jSourceImpl.java:734)
>        at $Neo4jSource_1306fa8fc0b.addNodes($Neo4jSource_1306fa8fc0b.java)
>        at 
> my.services.input.RowLineProcessorImpl.processLogLines(RowLineProcessorImpl.java:86)
>        at 
> $RowLineProcessor_1306fa8fc11.processLogLines($RowLineProcessor_1306fa8fc11.java)
>        at 
> $RowLineProcessor_1306fa8fc0f.processLogLines($RowLineProcessor_1306fa8fc0f.java)
>        at 
> my.services.input.PickUpPollerImpl$DirPoller.run(PickUpPollerImpl.java:168)
>        at java.util.TimerThread.mainLoop(Timer.java:534)
>        at java.util.TimerThread.run(Timer.java:484)
> Caused by: javax.transaction.HeuristicMixedException: Unable to
> rollback ---> error in commit: java.lang.OutOfMemoryError: Java heap
> space ---> error code for rollback: 0
>        at 
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:669)
>        at 
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:588)
>        at 
> org.neo4j.kernel.impl.transaction.TransactionImpl.commit(TransactionImpl.java:107)
>        at 
> org.neo4j.kernel.TopLevelTransaction.finish(TopLevelTransaction.java:85)
>        ... 8 more
> Caused by: javax.transaction.xa.XAException: Unknown
> xid[GlobalId[NEOKERNL|9147195978689142839|809], BranchId[ 52 49 52 49
> 52 49 ]]
>        at 
> org.neo4j.kernel.impl.transaction.xaframework.XaResourceManager.rollback(XaResourceManager.java:470)
>        at 
> org.neo4j.kernel.impl.transaction.xaframework.XaResourceHelpImpl.rollback(XaResourceHelpImpl.java:111)
>        at 
> org.neo4j.kernel.impl.transaction.TransactionImpl.doRollback(TransactionImpl.java:533)
>        at 
> org.neo4j.kernel.impl.transaction.TxManager.commit(TxManager.java:651)
>        ... 11 more
>
> This are the command line options used to start the JVM:
>
> -Djava.awt.headless=true -XX:MaxPermSize=512m -Xms512m -Xmx2048m
>
> The box has 8G of RAM
>
> At the time of the exception the db had 4482380 nodes and 94613402
> relationships, a lot of my relations goes to a single node.
>
> The operations as usual are simple insert in the DB with some checks
> on Index (RelationalIndex and plain Index).
>
> Any help is really appreciated
>
> Cheers
> --
> Massimo
> http://meridio.blogspot.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Indexing Strings vs Indexing Integers

2011-06-14 Thread Aman
Which one is better? and how? Indexing Strings or Indexing Integers? Please
explain in a way that a newbie to indexing (like me) might understand.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot execute Cypher

2011-06-14 Thread Pierre De Wilde
Safari 5.0.5, Chrome 12.0.742.91, Firefox 4.0.1, Opera 11.11, ...

Neo4j 1.4.M04, from webadmin console:

Using Gremlin:

gremlin>g.v(1).name
==> marko

Using Cypher:

>start n=(1) return n
>

Nothing is returned...

Pierre

2011/6/12 Peter Neubauer 

> Mmh,
> that is strange. Btw, the cypher console is running against the
> build-in console service, and the cypher-plugin is only for the REST
> representation.
>
> What browser are you running?
>
> Cheers,
>
> /peter neubauer
>
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
>
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Sun, Jun 12, 2011 at 8:33 AM, Pierre De Wilde
>  wrote:
> > Hey,
> >
> > I have built and installed neo4-cypher-script in neo4j/plugins but Cypher
> > returns nothing from webadmin console:
> >
> >>start n=(0) return n
> >>
> >
> > Gremlin works correctly:
> >
> > gremlin>g.v(0)
> > ==> v[0]
> >
> > Both Cypher and Gremlin plugins are installed as extensions:
> >
> > http://localhost:7474/db/data/
> > {
> >
> >  "relationship_index" : "
> http://localhost:7474/db/data/index/relationship";,
> >  "node" : "http://localhost:7474/db/data/node";,
> >  "relationship_types" : "
> http://localhost:7474/db/data/relationship/types";,
> >  "extensions_info" : "http://localhost:7474/db/data/ext";,
> >  "node_index" : "http://localhost:7474/db/data/index/node";,
> >  "reference_node" : "http://localhost:7474/db/data/node/0";,
> >  "extensions" : {
> >"CypherPlugin" : {
> >  "execute_query" :
> > "http://localhost:7474/db/data/ext/CypherPlugin/graphdb/execute_query";
> >},
> >"GremlinPlugin" : {
> >  "execute_script" :
> > "http://localhost:7474/db/data/ext/GremlinPlugin/graphdb/execute_script";
> >}
> >  }
> > }
> >
> > Pierre
> > ___
> > Neo4j mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
> >
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Indexing Strings vs Indexing Integers

2011-06-14 Thread Rick Bullotta
indexing integers almost certainly.  Faster comparisons, less storage and disk 
IO, smaller memory footprint.



- Reply message -
From: "Aman" 
Date: Tue, Jun 14, 2011 7:47 am
Subject: [Neo4j] Indexing Strings vs Indexing Integers
To: "user@lists.neo4j.org" 

Which one is better? and how? Indexing Strings or Indexing Integers? Please
explain in a way that a newbie to indexing (like me) might understand.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot find a path

2011-06-14 Thread Josh Adell
Hello all, sorry for the re-post, but I am still stuck.  Does anyone have an
idea about what I may be doing wrong, or is there any more information I can
provide to help diagnose?

Thanks!

-- Josh Adell

> --
>
> Message: 6
> Date: Sun, 12 Jun 2011 14:17:17 -0400
> From: Josh Adell 
> Subject: [Neo4j] Cannot find a path
> To: user@lists.neo4j.org
> Message-ID: 
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hello all,
>
> I recently began exploring Neo4j REST interface, and I am having a problem
> finding paths between nodes.
> I am using neo4j-community-1.4.M03
>
> My nodes and relationships look like this (verified using the webadmin
> interface):
>
> (1: Node A) IN> (3: Node C) 
> Using curl, I can query from node A to C:
> 
> $ curl -i -HAccept:application/json -HContent-Type:application/json -X POST
> -d '{"to":"http://localhost:7474/db/data/node/3"}'
> http://localhost:7474/db/data/node/1/path
> HTTP/1.1 200 OK
> Content-Length: 292
> Content-Encoding: UTF-8
> Content-Type: application/json
> Access-Control-Allow-Origin: *
> Server: Jetty(6.1.25)
>
> {
>  "start" : "http://localhost:7474/db/data/node/1";,
>  "nodes" : [ "http://localhost:7474/db/data/node/1";, "
> http://localhost:7474/db/data/node/3"; ],
>  "length" : 1,
>  "relationships" : [ "http://localhost:7474/db/data/relationship/5"; ],
>  "end" : "http://localhost:7474/db/data/node/3";
> }
> 
> I get similar results for querying for paths from B to C.
>
> But when I try to get a path from A to B (which is through C), I get an
> empty result set:
> 
> $ curl -HAccept:application/json -HContent-Type:application/json -i -X POST
> -d '{"to":"http://localhost:7474/db/data/node/2"}'
> http://localhost:7474/db/data/node/1/path
> HTTP/1.1 404 Not Found
> Access-Control-Allow-Origin: *
> Content-Type: text/html; charset=iso-8859-1
> Cache-Control: must-revalidate,no-cache,no-store
> Content-Length: 1385
> Server: Jetty(6.1.25)
>
> 
> 
> 
> Error 404 Not Found
> 
> HTTP ERROR 404
> Problem accessing /db/data/node/1/path. Reason:
> Not FoundPowered by
> Jetty://
> 
> 
> 
> 
>
> Querying "paths" from A to C returns a JSON encoded array containing the
> one
> path, but "paths" from A to B returns an empty array ("[ ]").
>
> Can anyone see anything wrong with my setup or the way I am querying?  This
> seem like pretty basic functionality, so I'm assuming I'm just doing
> something incorrectly.
>
> Thanks in advance for any help!
>
> -- Josh Adell
>
>
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot find a path

2011-06-14 Thread Peter Neubauer
Josh,
working on it ...

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jun 14, 2011 at 2:44 PM, Josh Adell  wrote:
> Hello all, sorry for the re-post, but I am still stuck.  Does anyone have an
> idea about what I may be doing wrong, or is there any more information I can
> provide to help diagnose?
>
> Thanks!
>
> -- Josh Adell
>
>> --
>>
>> Message: 6
>> Date: Sun, 12 Jun 2011 14:17:17 -0400
>> From: Josh Adell 
>> Subject: [Neo4j] Cannot find a path
>> To: user@lists.neo4j.org
>> Message-ID: 
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Hello all,
>>
>> I recently began exploring Neo4j REST interface, and I am having a problem
>> finding paths between nodes.
>> I am using neo4j-community-1.4.M03
>>
>> My nodes and relationships look like this (verified using the webadmin
>> interface):
>>
>> (1: Node A) IN> (3: Node C) >
>> Using curl, I can query from node A to C:
>> 
>> $ curl -i -HAccept:application/json -HContent-Type:application/json -X POST
>> -d '{"to":"http://localhost:7474/db/data/node/3"}'
>> http://localhost:7474/db/data/node/1/path
>> HTTP/1.1 200 OK
>> Content-Length: 292
>> Content-Encoding: UTF-8
>> Content-Type: application/json
>> Access-Control-Allow-Origin: *
>> Server: Jetty(6.1.25)
>>
>> {
>>  "start" : "http://localhost:7474/db/data/node/1";,
>>  "nodes" : [ "http://localhost:7474/db/data/node/1";, "
>> http://localhost:7474/db/data/node/3"; ],
>>  "length" : 1,
>>  "relationships" : [ "http://localhost:7474/db/data/relationship/5"; ],
>>  "end" : "http://localhost:7474/db/data/node/3";
>> }
>> 
>> I get similar results for querying for paths from B to C.
>>
>> But when I try to get a path from A to B (which is through C), I get an
>> empty result set:
>> 
>> $ curl -HAccept:application/json -HContent-Type:application/json -i -X POST
>> -d '{"to":"http://localhost:7474/db/data/node/2"}'
>> http://localhost:7474/db/data/node/1/path
>> HTTP/1.1 404 Not Found
>> Access-Control-Allow-Origin: *
>> Content-Type: text/html; charset=iso-8859-1
>> Cache-Control: must-revalidate,no-cache,no-store
>> Content-Length: 1385
>> Server: Jetty(6.1.25)
>>
>> 
>> 
>> 
>> Error 404 Not Found
>> 
>> HTTP ERROR 404
>> Problem accessing /db/data/node/1/path. Reason:
>>     Not FoundPowered by
>> Jetty://
>> 
>> 
>> 
>> 
>>
>> Querying "paths" from A to C returns a JSON encoded array containing the
>> one
>> path, but "paths" from A to B returns an empty array ("[ ]").
>>
>> Can anyone see anything wrong with my setup or the way I am querying?  This
>> seem like pretty basic functionality, so I'm assuming I'm just doing
>> something incorrectly.
>>
>> Thanks in advance for any help!
>>
>> -- Josh Adell
>>
>>
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Indexing Strings vs Indexing Integers

2011-06-14 Thread Peter Hunsberger
Better for what? Speed & efficency, use integers. However, there are some
use cases where an integer is not big enough...

On Jun 14, 2011 7:47 AM, "Aman"  wrote:

Which one is better? and how? Indexing Strings or Indexing Integers? Please
explain in a way that a newbie to indexing (like me) might understand.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] WebAdmin executing bad requests

2011-06-14 Thread Jim Webber
Hi Tatham,

I can reproduce this behaviour using your config on Windows. And it turns out 
that using your config on Mac stops webadmin from starting in the browser at 
all!

But if you use the config below (note the paths rather than full URIs for your 
webadmin and data endpoints) it'll work out just fine.

In the meantime I'll go dig around in the config code to see if we can't make 
it a bit more helpful (perhaps something like a prominent failure to startup if 
the config is off).

Jim




# Neo4j configuration
#


#***
# Server configuration
#***

# location of the database directory 
org.neo4j.server.database.location=data/graph.db

# http port (for all data, administrative, and UI access)
org.neo4j.server.webserver.port=5100


#*
# Administration client configuration
#*

# location of the servers round-robin database directory
org.neo4j.server.webadmin.rrdb.location=data/graph.db/../rrd

# REST endpoint for the data API
# Note the / in the end is mandatory
org.neo4j.server.webadmin.data.uri=/db/data/

# REST endpoint of the administration API (used by Webadmin)
org.neo4j.server.webadmin.management.uri=/db/manage/

# Low-level graph engine tuning file
org.neo4j.server.db.tuning.properties=conf/neo4j.properties


#Comma separated list of JAXRS packages contains JAXRS Resoruce, one package 
name for each mountpoint.
#the listed package names will be loaded under the mountpoints specified, 
uncomment this line
#to mount the org.neo4j.examples.server.unmanaged.HelloWorldResource.java from 
neo4j-examples
#under /examples/unmanaged, resulting in a final URL of 
http://localhost:7474/examples/unmanaged/helloworld/{nodeId}
#org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] WebAdmin executing bad requests

2011-06-14 Thread Tatham Oddie
Thanks Jim.

I used full paths as that's what is documented here:

  http://docs.neo4j.org/chunked/1.4.M03/server-configuration.html

It states:

  Set the URI path for the REST data API through which the database is 
accessed.
  For non-local access, consider to put in the external hostname of your 
server
  instead of localhost, e.g. http://my.host:7474/db/data.

  org.neo4j.server.webadmin.data.uri=http://localhost:7474/db/data/

Which one is right - the app or the doco? :)


-- Tatham


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Jim Webber
Sent: Tuesday, 14 June 2011 11:09 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] WebAdmin executing bad requests

Hi Tatham,

I can reproduce this behaviour using your config on Windows. And it turns out 
that using your config on Mac stops webadmin from starting in the browser at 
all!

But if you use the config below (note the paths rather than full URIs for your 
webadmin and data endpoints) it'll work out just fine.

In the meantime I'll go dig around in the config code to see if we can't make 
it a bit more helpful (perhaps something like a prominent failure to startup if 
the config is off).

Jim




# Neo4j configuration
#


#***
# Server configuration
#***

# location of the database directory
org.neo4j.server.database.location=data/graph.db

# http port (for all data, administrative, and UI access)
org.neo4j.server.webserver.port=5100


#*
# Administration client configuration
#*

# location of the servers round-robin database directory 
org.neo4j.server.webadmin.rrdb.location=data/graph.db/../rrd

# REST endpoint for the data API
# Note the / in the end is mandatory
org.neo4j.server.webadmin.data.uri=/db/data/

# REST endpoint of the administration API (used by Webadmin) 
org.neo4j.server.webadmin.management.uri=/db/manage/

# Low-level graph engine tuning file
org.neo4j.server.db.tuning.properties=conf/neo4j.properties


#Comma separated list of JAXRS packages contains JAXRS Resoruce, one package 
name for each mountpoint.
#the listed package names will be loaded under the mountpoints specified, 
uncomment this line #to mount the 
org.neo4j.examples.server.unmanaged.HelloWorldResource.java from neo4j-examples 
#under /examples/unmanaged, resulting in a final URL of 
http://localhost:7474/examples/unmanaged/helloworld/{nodeId}
#org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Is Neo4j's New Cypher Query Language Related to Gremlin?

2011-06-14 Thread noppanit
Hi After I run the example from
http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html I got this
error. java.lang.NoSuchMethodError:
org.neo4j.graphmatching.AbstractPatternObject.getLabel()Ljava/lang/String;

Am I missing something here? Thanks :)

I also have this included in my pom.xml I'm not sure if this is outdated or
not? 


org.neo4j.graphmatching
neo4j-graphmatching
1.0
system
   
${project.basedir}/src/main/webapp/WEB-INF/lib/neo4j-graph-matching.jar


--
View this message in context: 
http://neo4j-user-list.438527.n3.nabble.com/Re-Neo4j-Is-Neo4j-s-New-Cypher-Query-Language-Related-to-Gremlin-tp3050976p3063096.html
Sent from the Neo4J User List mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Is Neo4j's New Cypher Query Language Related to Gremlin?

2011-06-14 Thread Andres Taylor
Hi there,

You are using an old version of graph-matching.

You should not have to depend on graph-matching. Just depend on cypher, and
it will pull the correct version of graph-matching.

If you want to depend on graph-matching explicitly, make sure you depend on
either 1.4.M04, or 1.4-SNAPSHOT.

Hope this helps,

Andrés

On Tue, Jun 14, 2011 at 3:52 PM, noppanit  wrote:

> Hi After I run the example from
> http://docs.neo4j.org/chunked/snapshot/cypher-query-lang.html I got this
> error. java.lang.NoSuchMethodError:
> org.neo4j.graphmatching.AbstractPatternObject.getLabel()Ljava/lang/String;
>
> Am I missing something here? Thanks :)
>
> I also have this included in my pom.xml I'm not sure if this is outdated or
> not?
>
>
>org.neo4j.graphmatching
>neo4j-graphmatching
>1.0
>system
>
>
> ${project.basedir}/src/main/webapp/WEB-INF/lib/neo4j-graph-matching.jar
>
>
> --
> View this message in context:
> http://neo4j-user-list.438527.n3.nabble.com/Re-Neo4j-Is-Neo4j-s-New-Cypher-Query-Language-Related-to-Gremlin-tp3050976p3063096.html
> Sent from the Neo4J User List mailing list archive at Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] WebAdmin executing bad requests

2011-06-14 Thread Jim Webber
Hey Tatham,

Existentially the app is right :-(

I'll get the docs cleaned up until such point that the config code can cope 
better with that.

Jim

PS - this problem still exists in 1.4 M04

On 14 Jun 2011, at 14:54, Tatham Oddie wrote:

> Thanks Jim.
> 
> I used full paths as that's what is documented here:
> 
>  http://docs.neo4j.org/chunked/1.4.M03/server-configuration.html
> 
> It states:
> 
>  Set the URI path for the REST data API through which the database is 
> accessed.
>  For non-local access, consider to put in the external hostname of your 
> server
>  instead of localhost, e.g. http://my.host:7474/db/data.
> 
>  org.neo4j.server.webadmin.data.uri=http://localhost:7474/db/data/
> 
> Which one is right - the app or the doco? :)
> 
> 
> -- Tatham
> 
> 
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
> Behalf Of Jim Webber
> Sent: Tuesday, 14 June 2011 11:09 PM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] WebAdmin executing bad requests
> 
> Hi Tatham,
> 
> I can reproduce this behaviour using your config on Windows. And it turns out 
> that using your config on Mac stops webadmin from starting in the browser at 
> all!
> 
> But if you use the config below (note the paths rather than full URIs for 
> your webadmin and data endpoints) it'll work out just fine.
> 
> In the meantime I'll go dig around in the config code to see if we can't make 
> it a bit more helpful (perhaps something like a prominent failure to startup 
> if the config is off).
> 
> Jim
> 
> 
> 
> 
> # Neo4j configuration
> #
> 
> 
> #***
> # Server configuration
> #***
> 
> # location of the database directory
> org.neo4j.server.database.location=data/graph.db
> 
> # http port (for all data, administrative, and UI access)
> org.neo4j.server.webserver.port=5100
> 
> 
> #*
> # Administration client configuration
> #*
> 
> # location of the servers round-robin database directory 
> org.neo4j.server.webadmin.rrdb.location=data/graph.db/../rrd
> 
> # REST endpoint for the data API
> # Note the / in the end is mandatory
> org.neo4j.server.webadmin.data.uri=/db/data/
> 
> # REST endpoint of the administration API (used by Webadmin) 
> org.neo4j.server.webadmin.management.uri=/db/manage/
> 
> # Low-level graph engine tuning file
> org.neo4j.server.db.tuning.properties=conf/neo4j.properties
> 
> 
> #Comma separated list of JAXRS packages contains JAXRS Resoruce, one package 
> name for each mountpoint.
> #the listed package names will be loaded under the mountpoints specified, 
> uncomment this line #to mount the 
> org.neo4j.examples.server.unmanaged.HelloWorldResource.java from 
> neo4j-examples #under /examples/unmanaged, resulting in a final URL of 
> http://localhost:7474/examples/unmanaged/helloworld/{nodeId}
> #org.neo4j.server.thirdparty_jaxrs_classes=org.neo4j.examples.server.unmanaged=/examples/unmanaged
> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot execute Cypher

2011-06-14 Thread Andres Taylor
Hi Pierre,

On Tue, Jun 14, 2011 at 1:48 PM, Pierre De Wilde wrote:
>
> >start n=(1) return n
> >
>
> Nothing is returned...


Could you look in the logs for any clues? They are in /data/log

Andrés
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Is Neo4j's New Cypher Query Language Related to Gremlin?

2011-06-14 Thread noppanit
I guess it's my IntelliJ then. I could test in on mvn test, but it couldn't
find some method in IntelliJ. 

Thanks :) And I took out the graph matching dependency already. 

--
View this message in context: 
http://neo4j-user-list.438527.n3.nabble.com/Re-Neo4j-Is-Neo4j-s-New-Cypher-Query-Language-Related-to-Gremlin-tp3050976p3063185.html
Sent from the Neo4J User List mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot find a path

2011-06-14 Thread Peter Neubauer
Josh,

you need to spcify the "max depth" parameter for the algo, which
defaults to 1 and thus is not gaining any results. I am pushing
documentation on this, and I am changing this to "max_depth", but for
the time being, it is something like

"{\"to\": \"http://localhost:7474/db/data/node/"+data.get().get( "him"
).getId()+"\"" +
",\"max depth\":2}"

Does that work?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jun 14, 2011 at 2:55 PM, Peter Neubauer
 wrote:
> Josh,
> working on it ...
>
> Cheers,
>
> /peter neubauer
>
> GTalk:      neubauer.peter
> Skype       peter.neubauer
> Phone       +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter      http://twitter.com/peterneubauer
>
> http://www.neo4j.org               - Your high performance graph database.
> http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Tue, Jun 14, 2011 at 2:44 PM, Josh Adell  wrote:
>> Hello all, sorry for the re-post, but I am still stuck.  Does anyone have an
>> idea about what I may be doing wrong, or is there any more information I can
>> provide to help diagnose?
>>
>> Thanks!
>>
>> -- Josh Adell
>>
>>> --
>>>
>>> Message: 6
>>> Date: Sun, 12 Jun 2011 14:17:17 -0400
>>> From: Josh Adell 
>>> Subject: [Neo4j] Cannot find a path
>>> To: user@lists.neo4j.org
>>> Message-ID: 
>>> Content-Type: text/plain; charset=ISO-8859-1
>>>
>>> Hello all,
>>>
>>> I recently began exploring Neo4j REST interface, and I am having a problem
>>> finding paths between nodes.
>>> I am using neo4j-community-1.4.M03
>>>
>>> My nodes and relationships look like this (verified using the webadmin
>>> interface):
>>>
>>> (1: Node A) IN> (3: Node C) >>
>>> Using curl, I can query from node A to C:
>>> 
>>> $ curl -i -HAccept:application/json -HContent-Type:application/json -X POST
>>> -d '{"to":"http://localhost:7474/db/data/node/3"}'
>>> http://localhost:7474/db/data/node/1/path
>>> HTTP/1.1 200 OK
>>> Content-Length: 292
>>> Content-Encoding: UTF-8
>>> Content-Type: application/json
>>> Access-Control-Allow-Origin: *
>>> Server: Jetty(6.1.25)
>>>
>>> {
>>>  "start" : "http://localhost:7474/db/data/node/1";,
>>>  "nodes" : [ "http://localhost:7474/db/data/node/1";, "
>>> http://localhost:7474/db/data/node/3"; ],
>>>  "length" : 1,
>>>  "relationships" : [ "http://localhost:7474/db/data/relationship/5"; ],
>>>  "end" : "http://localhost:7474/db/data/node/3";
>>> }
>>> 
>>> I get similar results for querying for paths from B to C.
>>>
>>> But when I try to get a path from A to B (which is through C), I get an
>>> empty result set:
>>> 
>>> $ curl -HAccept:application/json -HContent-Type:application/json -i -X POST
>>> -d '{"to":"http://localhost:7474/db/data/node/2"}'
>>> http://localhost:7474/db/data/node/1/path
>>> HTTP/1.1 404 Not Found
>>> Access-Control-Allow-Origin: *
>>> Content-Type: text/html; charset=iso-8859-1
>>> Cache-Control: must-revalidate,no-cache,no-store
>>> Content-Length: 1385
>>> Server: Jetty(6.1.25)
>>>
>>> 
>>> 
>>> 
>>> Error 404 Not Found
>>> 
>>> HTTP ERROR 404
>>> Problem accessing /db/data/node/1/path. Reason:
>>>     Not FoundPowered by
>>> Jetty://
>>> 
>>> 
>>> 
>>> 
>>>
>>> Querying "paths" from A to C returns a JSON encoded array containing the
>>> one
>>> path, but "paths" from A to B returns an empty array ("[ ]").
>>>
>>> Can anyone see anything wrong with my setup or the way I am querying?  This
>>> seem like pretty basic functionality, so I'm assuming I'm just doing
>>> something incorrectly.
>>>
>>> Thanks in advance for any help!
>>>
>>> -- Josh Adell
>>>
>>>
>>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Problems binding to a specific ip

2011-06-14 Thread Johan Lundberg
Hello,

Are there any plans to address the access control problem? I think that
even when you can use iptables or similar to achieve the same end
result, it would be nice to be able to set a bind address in the neo4j
configuration.

Also https would be a nice feature :)

Br
Johan

On 2011-06-09 16.14, Chris Gioran wrote:
> Hi Max,
> 
> there are two distinct problems here
> 
> One is that there is no IP access control that can be configured
> through Neo4j. Setting the
> listen URIs to a specific address in the configuration does not bind
> the server there exclusively. This
> behavior has to be imposed with external means, such as a firewall.
> 
> The other is a benign bug that has to do with logging the listen
> address - currently it uses always the
> java.net.InetAddress methods to find the hostname, ignoring the
> configuration and leading to the
> behavior you describe, since the JVM does not prefer the localhost
> interface. This will be of course
> addressed in subsequent SNAPSHOTs and milestone releases but it will
> remain the default behavior.
> 
> Hope that clarifies things.
> 
> cheers,
> CG
> 
> On Wed, Jun 8, 2011 at 2:59 PM, Maximilian Schulz  wrote:
>> Hi everyone,
>>
>> after weeks of experimentation, we finally migrated one of our apps features
>> to neo4j. But now that we are about to deploy the app to our staging server,
>> we discovered a small problem with the server configuration. We have checked
>> the manual at
>> http://docs.neo4j.org/chunked/1.4.M03/server-configuration.html and followed
>> the suggested configuration, but we are not getting the expected results.
>>
>> What we are trying to achieve is to bind the server to localhost, so it is
>> no longer accessible from outside. We restricted access to IPv4 in the
>> wrapper config and set the webadmin data and manage uri to
>> http://localhost:7474. But when starting the server it still binds to the
>> hostname.
>>
>> Here is the output of the start process. Check the last line, where it
>> states that the server is started on http://OUR_DOMAIN:7474/
>>
>> 6/8/11 1:44:46 PM org.neo4j.server.database.Database INFO: Using database at
>> /tmp/neo4j-community-1.4.M03/data/graph.db
>> 6/8/11 1:44:47 PM org.neo4j.server.modules.DiscoveryModule INFO: Mounted
>> discovery module at [/]
>> 6/8/11 1:44:47 PM org.neo4j.server.modules.RESTApiModule INFO: Mounted REST
>> API at [http://localhost:7474/db/data/]
>> 6/8/11 1:44:47 PM org.neo4j.server.modules.ManagementApiModule INFO: Mounted
>> management API at [http://localhost:7474/db/manage/]
>> 6/8/11 1:44:47 PM org.neo4j.server.modules.WebAdminModule INFO: Mounted
>> webadmin at [/webadmin]
>> 6/8/11 1:44:47 PM org.neo4j.server.NeoServerWithEmbeddedWebServer INFO:
>> Starting Neo Server on port [7474]
>> 6/8/11 1:44:47 PM org.neo4j.server.web.Jetty6WebServer INFO: Mounting static
>> content at [/webadmin] from [webadmin-html]
>> 6/8/11 1:44:48 PM org.neo4j.server.NeoServerWithEmbeddedWebServer INFO:
>> Server started on [http://OUR_DOMAIN:7474/]
>>
>>
>> I am pretty sure that I have missed something, but I cannot figure out what.
>> Any help is greatly appreciated!
>>
>> Max
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user


-- 
Johan Lundberg
NORDUnet NUNOC
lundb...@nordu.net
+46(0)8 207860
Tulegatan 11
113 53 Stockholm
Sweden
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Problems binding to a specific ip

2011-06-14 Thread Jim Webber
Hi Johan,

We do have some security features in our backlog, but they are a low priority 
at the moment. If there's a push for such features here on the list, it'd be 
helpful so that we can understand the relative priorities for people in the 
community.

Jim
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Query Number of Nodes with Property Filter

2011-06-14 Thread Marko Rodriguez
Hi,

> Is it possible that when we create the Automatic Index, that we can filter it 
> on specific nodes?

No.

>  Referring to the diagram below, we have a Node with a property _Type= 
> Agency. I would like to create an index (aidx-agency-key) based on Key but 
> only for the Nodes with _Type=Agency.
> So, pseudo code would be:
> g.createAutomaticIndex('myIndex', Vertex.class, new pair[,] 
> {Node._Type=Agency},“Key”)
>  
> Is this the right approach, or are we doing something wrong

You can't do that with AutomaticIndices.

> The solution we want is to be able to count all the Nodes in the database 
> with a property _Type=Agency and property Key=”myKey” or to checking the 
> existence of a Node  with _Type=”Agency” and Key=”myKey”.

Yea. The not so efficient way to do that is:

g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()

1. get agencies
2. iterate and filter out those whose key doesn't equal 'myKey'
3. count up what gets emitted from the pipeline.

Perhaps Neo4j guys can help as there are some things with Lucene indices and 
the 'AND' clause. Given that AutomaticIndex, when used with Neo4jGraph, is just 
a wrapper to Lucene, I believe you can do stuff like '_Type AND Key=myKey' ? -- 
I've never done it so I don't know... Rick, on this list, knows the ins and 
outs of indices 

> 
> and to do a count or check if it exists would be multiple filters
> g.V[[_Typey:Agency],[ Name:Acme]].count()

Yea, thats a bit excessive -- too many things to iterate through. You can do 
the previous:
g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()

> 

Good luck,
Marko.

http://markorodriguez.com

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Auto Indexing for Neo4j

2011-06-14 Thread Chris Gioran
Good news everyone,

A request that's often come up on the mailing list is a mechanism for
automatically indexing properties of nodes and relationships.

As of today's SNAPSHOT, auto-indexing is part of Neo4j which means nodes
and relationships can now be indexed based on convention, requiring
far less effort and code from the developer's point of view.

Getting hold of an automatic index is straightforward:

AutoIndexer nodeAutoIndexer = graphDb.index().getNodeAutoIndexer();
AutoIndex nodeAutoIndex = nodeAutoIndexer.getAutoIndex();

Once you've got an instance of AutoIndex, you can use it as a read-only
Index.

The AutoIndexer interface also supports runtime changes and
enabling/disabling the auto indexing functionality.

To support the new features, there are new Config
options you can pass to the startup configuration map in
EmbeddedGraphDatabase, the most important of which are:

Config.NODE_AUTO_INDEXING (defaults to "false")
Config.RELATIONSHIP_AUTO_INDEXING (defaults to "false")

If set to "true" (independently of each other) these properties will
enable auto indexing functionality and at the successful finish() of
each transaction, all newly added properties on the primitives for which
auto indexing is enabled will be added to a special AutoIndex (and
deleted or changed properties will be updated accordingly too).

There are options for fine grained control to determine
properties are indexed, default behaviors and so forth. For example, by
default all properties are indexed. If you want only properties "name" and
"age" for Nodes and "since" and "until" for Relationships
to be auto indexed, simply set the initial configuration as follows:

Config.NODE_KEYS_INDEXABLE = "name, age";
Config.RELATIONSHIP_KEYS_INDEXABLE="since, until";

For the semantics of the auto-indexing operations, constraints and more
detailed examples, see the documentation available  at

http://docs.neo4j.org/chunked/1.4-SNAPSHOT/auto-indexing.html

We're pretty excited about this feature since we think it'll make your lives
as developers much more productive in a range of use-cases. If you're
comfortable with using SNAPSHOT versions of Neo4j, please try it out
and let us know what you think - we'd really value your feedback.

If you're happier with using packaged milestones then this feature
will be available from 1.4 M05 in a couple of weeks from now.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Query Number of Nodes with Property Filter

2011-06-14 Thread Michael Hunger
you can use category nodes to connect nodes of a certain type to.

then you can count the nodes using a traversal

you dont have to go via an index to do things like that


Sent from my iBrick4


Am 14.06.2011 um 17:10 schrieb Marko Rodriguez :

> Hi,
> 
>> Is it possible that when we create the Automatic Index, that we can filter 
>> it on specific nodes?
> 
> No.
> 
>> Referring to the diagram below, we have a Node with a property _Type= 
>> Agency. I would like to create an index (aidx-agency-key) based on Key but 
>> only for the Nodes with _Type=Agency.
>> So, pseudo code would be:
>> g.createAutomaticIndex('myIndex', Vertex.class, new pair[,] 
>> {Node._Type=Agency},“Key”)
>> 
>> Is this the right approach, or are we doing something wrong
> 
> You can't do that with AutomaticIndices.
> 
>> The solution we want is to be able to count all the Nodes in the database 
>> with a property _Type=Agency and property Key=”myKey” or to checking the 
>> existence of a Node  with _Type=”Agency” and Key=”myKey”.
> 
> Yea. The not so efficient way to do that is:
> 
> g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
> 
> 1. get agencies
> 2. iterate and filter out those whose key doesn't equal 'myKey'
> 3. count up what gets emitted from the pipeline.
> 
> Perhaps Neo4j guys can help as there are some things with Lucene indices and 
> the 'AND' clause. Given that AutomaticIndex, when used with Neo4jGraph, is 
> just a wrapper to Lucene, I believe you can do stuff like '_Type AND 
> Key=myKey' ? -- I've never done it so I don't know... Rick, on this list, 
> knows the ins and outs of indices 
> 
>> 
>> and to do a count or check if it exists would be multiple filters
>> g.V[[_Typey:Agency],[ Name:Acme]].count()
> 
> Yea, thats a bit excessive -- too many things to iterate through. You can do 
> the previous:
>g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
> 
>> 
> 
> Good luck,
> Marko.
> 
> http://markorodriguez.com
> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Auto Indexing for Neo4j

2011-06-14 Thread Craig Taverner
This is great news.

Now I'm really curious about the next step, and that is allowing indexes
other than lucene. For example, the RTree index in neo4j-spatial was never
possible to wrap behind the normal index API, because that was designed only
for properties of nodes (and relationships), but the RTree is based on
something completely different (complete spatial geometries). However, the
new auto-indexing feature implies that any node can be added to an index
without the developer needing to know anything about the index API. Instead
the index needs to know if the node is appropriate for indexing. This is
suitable for both lucene and the RTree.

So what I'd like to see is that when configuring auto-indexing in the first
place, instead of just specifying properties to index, specify some indexer
implementation that can be created and run internally. For example, perhaps
you pass the classname of some class that implements some necessary
interface, and then that is instantiated, passed config properties, and used
to index new or modified nodes. One method I could imagine this interface
having would be a listener for change events to be evaluated for whether or
not the index should be activated for a node change. For the lucene property
index, this method would return true if the property exists on that node.
For the RTree this method would return true if the node contained the
meta-data required for neo4j-spatial to recognize it as a spatial type?
Alternatively just an index method that does nothing when the nodes are not
to be indexed, and indexes when necessary?

So, are we now closer to having this kind of support?

On Tue, Jun 14, 2011 at 11:30 PM, Chris Gioran <
chris.gio...@neotechnology.com> wrote:

> Good news everyone,
>
> A request that's often come up on the mailing list is a mechanism for
> automatically indexing properties of nodes and relationships.
>
> As of today's SNAPSHOT, auto-indexing is part of Neo4j which means nodes
> and relationships can now be indexed based on convention, requiring
> far less effort and code from the developer's point of view.
>
> Getting hold of an automatic index is straightforward:
>
> AutoIndexer nodeAutoIndexer = graphDb.index().getNodeAutoIndexer();
> AutoIndex nodeAutoIndex = nodeAutoIndexer.getAutoIndex();
>
> Once you've got an instance of AutoIndex, you can use it as a read-only
> Index.
>
> The AutoIndexer interface also supports runtime changes and
> enabling/disabling the auto indexing functionality.
>
> To support the new features, there are new Config
> options you can pass to the startup configuration map in
> EmbeddedGraphDatabase, the most important of which are:
>
> Config.NODE_AUTO_INDEXING (defaults to "false")
> Config.RELATIONSHIP_AUTO_INDEXING (defaults to "false")
>
> If set to "true" (independently of each other) these properties will
> enable auto indexing functionality and at the successful finish() of
> each transaction, all newly added properties on the primitives for which
> auto indexing is enabled will be added to a special AutoIndex (and
> deleted or changed properties will be updated accordingly too).
>
> There are options for fine grained control to determine
> properties are indexed, default behaviors and so forth. For example, by
> default all properties are indexed. If you want only properties "name" and
> "age" for Nodes and "since" and "until" for Relationships
> to be auto indexed, simply set the initial configuration as follows:
>
> Config.NODE_KEYS_INDEXABLE = "name, age";
> Config.RELATIONSHIP_KEYS_INDEXABLE="since, until";
>
> For the semantics of the auto-indexing operations, constraints and more
> detailed examples, see the documentation available  at
>
> http://docs.neo4j.org/chunked/1.4-SNAPSHOT/auto-indexing.html
>
> We're pretty excited about this feature since we think it'll make your
> lives
> as developers much more productive in a range of use-cases. If you're
> comfortable with using SNAPSHOT versions of Neo4j, please try it out
> and let us know what you think - we'd really value your feedback.
>
> If you're happier with using packaged milestones then this feature
> will be available from 1.4 M05 in a couple of weeks from now.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Cannot execute Cypher

2011-06-14 Thread Pierre De Wilde
Hi Andrés,

>From data/log:

java.lang.IncompatibleClassChangeError: Class
scala.collection.mutable.HashMap$$anon$1 does not implement the requested
interface scala.collection.generic.Addable
at org.neo4j.cypher.SymbolTable.identifiers(SymbolTable.scala:130)
at
org.neo4j.cypher.SymbolTable.checkConnectednessOfPatternGraph(SymbolTable.scala:74)
at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:55)
at
org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:40)
at
org.neo4j.server.webadmin.console.CypherSession.evaluate(CypherSession.java:70)
at
org.neo4j.server.webadmin.rest.ConsoleService.exec(ConsoleService.java:110)

HTH,
Pierre
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot execute Cypher

2011-06-14 Thread noppanit
I think it might be you're mixing org.neo4j.cypher.javacompat and
org.neo4j.cypher together? 

--
View this message in context: 
http://neo4j-user-list.438527.n3.nabble.com/Neo4j-Cannot-execute-Cypher-tp3063669p3063697.html
Sent from the Neo4J User List mailing list archive at Nabble.com.
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot execute Cypher

2011-06-14 Thread Andres Taylor
No, this is executed through the console. No problem there.

On Tue, Jun 14, 2011 at 6:27 PM, noppanit  wrote:

> I think it might be you're mixing org.neo4j.cypher.javacompat and
> org.neo4j.cypher together?
>
> --
> View this message in context:
> http://neo4j-user-list.438527.n3.nabble.com/Neo4j-Cannot-execute-Cypher-tp3063669p3063697.html
> Sent from the Neo4J User List mailing list archive at Nabble.com.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot execute Cypher

2011-06-14 Thread Andres Taylor
Hi again Pierre,

By looking at the code, I'm going to guess that you might have some other
Scala things loaded in your server, and they are pulling in a different
version of the Scala-libs. Could that be the case?

Andrés

On Tue, Jun 14, 2011 at 6:19 PM, Pierre De Wilde wrote:

> Hi Andrés,
>
> From data/log:
>
> java.lang.IncompatibleClassChangeError: Class
> scala.collection.mutable.HashMap$$anon$1 does not implement the requested
> interface scala.collection.generic.Addable
> at org.neo4j.cypher.SymbolTable.identifiers(SymbolTable.scala:130)
> at
>
> org.neo4j.cypher.SymbolTable.checkConnectednessOfPatternGraph(SymbolTable.scala:74)
> at org.neo4j.cypher.ExecutionEngine.execute(ExecutionEngine.scala:55)
> at
>
> org.neo4j.cypher.javacompat.ExecutionEngine.execute(ExecutionEngine.java:40)
> at
>
> org.neo4j.server.webadmin.console.CypherSession.evaluate(CypherSession.java:70)
> at
> org.neo4j.server.webadmin.rest.ConsoleService.exec(ConsoleService.java:110)
>
> HTH,
> Pierre
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Extent of Indexing

2011-06-14 Thread Aman
I've been working on a project (a CMS) that would require a lot of indexing
as it would manage user generated content (mostly strings). Could I get some
suggestions on what is the extent of indexing that can be useful in a
typical CMS which could have a fair use by about 5 people? And how does
this indexing matter if I have to scale it any further?

Also, as I said above, the index would mostly deal with strings. Would it be
any better if I put up another layer in front of my neo4j db that maps those
strings to ints so that I could index those easily in neo4j?
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Auto Indexing for Neo4j

2011-06-14 Thread Aseem Kishore
Awesome to hear, and great work! Will we be able to configure+use this from
the REST API?

Cheers,
Aseem

On Tue, Jun 14, 2011 at 8:30 AM, Chris Gioran <
chris.gio...@neotechnology.com> wrote:

> Good news everyone,
>
> A request that's often come up on the mailing list is a mechanism for
> automatically indexing properties of nodes and relationships.
>
> As of today's SNAPSHOT, auto-indexing is part of Neo4j which means nodes
> and relationships can now be indexed based on convention, requiring
> far less effort and code from the developer's point of view.
>
> Getting hold of an automatic index is straightforward:
>
> AutoIndexer nodeAutoIndexer = graphDb.index().getNodeAutoIndexer();
> AutoIndex nodeAutoIndex = nodeAutoIndexer.getAutoIndex();
>
> Once you've got an instance of AutoIndex, you can use it as a read-only
> Index.
>
> The AutoIndexer interface also supports runtime changes and
> enabling/disabling the auto indexing functionality.
>
> To support the new features, there are new Config
> options you can pass to the startup configuration map in
> EmbeddedGraphDatabase, the most important of which are:
>
> Config.NODE_AUTO_INDEXING (defaults to "false")
> Config.RELATIONSHIP_AUTO_INDEXING (defaults to "false")
>
> If set to "true" (independently of each other) these properties will
> enable auto indexing functionality and at the successful finish() of
> each transaction, all newly added properties on the primitives for which
> auto indexing is enabled will be added to a special AutoIndex (and
> deleted or changed properties will be updated accordingly too).
>
> There are options for fine grained control to determine
> properties are indexed, default behaviors and so forth. For example, by
> default all properties are indexed. If you want only properties "name" and
> "age" for Nodes and "since" and "until" for Relationships
> to be auto indexed, simply set the initial configuration as follows:
>
> Config.NODE_KEYS_INDEXABLE = "name, age";
> Config.RELATIONSHIP_KEYS_INDEXABLE="since, until";
>
> For the semantics of the auto-indexing operations, constraints and more
> detailed examples, see the documentation available  at
>
> http://docs.neo4j.org/chunked/1.4-SNAPSHOT/auto-indexing.html
>
> We're pretty excited about this feature since we think it'll make your
> lives
> as developers much more productive in a range of use-cases. If you're
> comfortable with using SNAPSHOT versions of Neo4j, please try it out
> and let us know what you think - we'd really value your feedback.
>
> If you're happier with using packaged milestones then this feature
> will be available from 1.4 M05 in a couple of weeks from now.
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Bug in Lucene Timeline Index (all versions, I think)

2011-06-14 Thread Rick Bullotta
If no lower bound is provided on a LuceneTimeline query, a default value of 0L 
is used.  This will not allow querying of values prior to January 1st, 1970.  
Perhaps it should be -Long.MAX_VALUE instead?

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] Archiving in time / being able to quickly refer to a historical state

2011-06-14 Thread Patrik Sundberg
Hi,

Design question:
I have a Book. A book has Elements. To change what Elements are in a Book
there are Effects. An Effect adds or deletes an element from a Book (and has
other info). Everyday I archive the state of a Book so that I can easily get
the state of the Book (it's Elements) at a historical point in time. The
number of elements and which elements are in a Book vary from day to day
depending on the Effects taking place in the time period.

So it's a bit like "Book contents archive of day X + 1 = Book contents
archive of day X + the Effects between X and X + 1"

There's no need to represent the daily archives in any way, it's the
functionality of having historical snapshots that matter to me, so that one
can easily get the state of a Book at any point in time by finding the
closest archive point before the time and applying the Effects from that
archive timestamp and the point of interest.

Ideally want to keep a long time history of Book state and Effects.

Any ideas for an effecient of organizing this in a graph friendly way?

Thanks,
Patrik
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Archiving in time / being able to quickly refer to a historical state

2011-06-14 Thread Patrik Sundberg
I should probably put in some estimates of the sort of orders of magnitude
of data involved:
Books are in the 100s
Effects are in the 10,000s / day
Elements are in the 100s / Book

On Tue, Jun 14, 2011 at 8:07 PM, Patrik Sundberg
wrote:

> Hi,
>
> Design question:
> I have a Book. A book has Elements. To change what Elements are in a Book
> there are Effects. An Effect adds or deletes an element from a Book (and has
> other info). Everyday I archive the state of a Book so that I can easily get
> the state of the Book (it's Elements) at a historical point in time. The
> number of elements and which elements are in a Book vary from day to day
> depending on the Effects taking place in the time period.
>
> So it's a bit like "Book contents archive of day X + 1 = Book contents
> archive of day X + the Effects between X and X + 1"
>
> There's no need to represent the daily archives in any way, it's the
> functionality of having historical snapshots that matter to me, so that one
> can easily get the state of a Book at any point in time by finding the
> closest archive point before the time and applying the Effects from that
> archive timestamp and the point of interest.
>
> Ideally want to keep a long time history of Book state and Effects.
>
> Any ideas for an effecient of organizing this in a graph friendly way?
>
> Thanks,
> Patrik
>
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] How to embed neo4j to OSGI env without spring?

2011-06-14 Thread Nicolas Jouanin
Hi Peter (and others),

May be you can help me with github...
I'dl like to work on this superbundle using the last version of 
neo4j-community. The problem is that i've already forked this repo for my 
previous work and now I can't fork it anymore. Also, i've made my modifications 
on the master branch.
Do you know a way of getting the last version of the source code without 
loosing my previous work ? I was thinking of checking out back to the time I've 
forked, then create a branch, then pull changes from the original repo.

Thx.

Le 14 juin 2011 à 09:03, Peter Neubauer a écrit :

> Nicolas,
> yes, after looking into the details involved, I think an "official"
> superbundle with the core Neo4j components bundled and exported woudl
> be the best way forward. Also, it would expose less granular bundles
> into an OSGi environment.
> 
> Other IndexProviders etc could be then inserted as fragments into that bundle.
> 
> It would be absolutely fantastic if you could work on that, maybe
> using the neo4j-osgi-examples as the demo project? We could then have
> a packaging project there or in a "neo4j-osgi" component that does the
> actual production of the superbundle.
> 
> WDYT?
> 
> Cheers,
> 
> /peter neubauer
> 
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
> 
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> 
> 
> 
> On Mon, Jun 13, 2011 at 11:10 AM, Nicolas Jouanin
>  wrote:
>> Hi Peter,
>> 
>> As shown below, exporting the implementation package is enough to make the 
>> IndexProvider registered as OSGi service (see first line of dump). Now an 
>> exception comes later when registering the index. I guess this come from the 
>> fact that you register a service of class IndexProvider whereas 
>> db.index().forNodes() returns an instance of Index.
>> 
>> [Framework Event Dispatcher] INFO 
>> org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle 
>> org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider 
>> registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene]
>> Kernel: attempting to load extensions of type 
>> org.neo4j.kernel.KernelExtension
>> Kernel: attempting to load extensions of type 
>> org.neo4j.graphdb.index.IndexProvider
>> Kernel: attempting to load extensions of type org.neo4j.kernel.Version
>> [Start Level Event Dispatcher] DEBUG 
>> BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent REGISTERED
>> [Start Level Event Dispatcher] DEBUG 
>> BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent 
>> UNREGISTERING
>> [Framework Event Dispatcher] DEBUG 
>> BuildByTinyBundlestinybundles904955895969775UID - BundleEvent STOPPED
>> [Framework Event Dispatcher] DEBUG 
>> BuildByTinyBundlestinybundles904955895969775UID - FrameworkEvent ERROR
>> org.osgi.framework.BundleException: Exception in 
>> org.neo4j.examples.osgi.Neo4jActivator.start() of bundle 
>> BuildByTinyBundlestinybundles904955895969775UID.
>>at 
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
>>at 
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
>>at 
>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
>>at 
>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
>>at 
>> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
>>at 
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
>>at 
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
>>at 
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
>>at 
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
>>at 
>> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
>>at 
>> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
>>at 
>> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
>> Caused by: java.lang.IllegalArgumentException: The service object is not an 
>> instance of the service class org.neo4j.graphdb.index.IndexProvider
>>at 
>> org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:201)
>>at 
>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507)
>>at 
>> org.eclipse.os

Re: [Neo4j] Archiving in time / being able to quickly refer to a historical state

2011-06-14 Thread McKinley
Can you describe what you mean by archiving the state of the book each day?
It seems that you have a transactional system with your effects and an
archive at a point in time just seems like the range of effects by date. Is
an archive a roll-up of the effects for efficiency or backup?

Cheers,

McKinley

On Tue, Jun 14, 2011 at 12:14 PM, Patrik Sundberg  wrote:
>
> > Design question:
> > I have a Book. A book has Elements. To change what Elements are in a Book
> > there are Effects. An Effect adds or deletes an element from a Book (and
> has
> > other info). Everyday I archive the state of a Book so that I can easily
> get
> > the state of the Book (it's Elements) at a historical point in time. The
> > number of elements and which elements are in a Book vary from day to day
> > depending on the Effects taking place in the time period.
> >
> > So it's a bit like "Book contents archive of day X + 1 = Book contents
> > archive of day X + the Effects between X and X + 1"
> >
> > There's no need to represent the daily archives in any way, it's the
> > functionality of having historical snapshots that matter to me, so that
> one
> > can easily get the state of a Book at any point in time by finding the
> > closest archive point before the time and applying the Effects from that
> > archive timestamp and the point of interest.
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] BatchInserter improvement with 1.4M04 but still got relationship building bottleneck [was Re: Speeding up initial import of graph...]

2011-06-14 Thread Michael Hunger
Paul,

for profiling you can get trial versions of the common profilers like YourKit 
or JProfiler, or even cheaper use JRockit with the integrated MissionControl 
from Oracle.
for memory analysis the eclipse memory analyzer (MAT) is very useful.

I think disk latency plays a big role here if the nodestore cache is not large 
enough. Have you measured the latency of the disk in your machine? (I have a 
SSD and experience no disk-traffic at all).
My import is CPU bound, executing about 150% cpu (50% by the gc-threads) in the 
first part of the node-creation import and around 100% (a single cpu) on the 
second part. As the import is running single threaded that is the max I can get.

You might also look at iostat on the mac and perhaps check the write-test to 
see how many tx per second your disk can sustain 
(http://wiki.neo4j.org/content/Linux_Performance_Guide)

We had issues with that on EC2 where EBS volumes are very unreliable. You said 
that you have a limited memory environment (why is that so?) are you also disk 
limited or could you get/create a faster disk for the graph store (i.e. raid0, 
or even an ssd) ?

Perhaps for testing reasons you should forgo the indexing stuff and concentrate 
on the raw performance, i.e. use the strings read directly as node-ids (to 
remove the impact (memory and performance) of any indexing and see if the raw 
insert performance on your system meets your needs).

You can also speed up the import part of the nodes if you control and provide 
the node-id's. Unfortunately there is no such means for the relationship 
creation.

Cheers

Michael

Am 14.06.2011 um 13:51 schrieb Paul Bandler:

> Michael,
> 
> Thanks for taking the time to investigate this.
> 
> Ø  I tried to use your implementation, it added quite a high performance 
> penalty, when profiling it, it consumed 3/4 of the time for the relationship 
> creation.
> The other time was spent in acquiring persistence windows for the node-store.
> 
> While I don’t have the benefit of a profiling tool, in the 2 environments 
> where I ran this the CPU utilisation was very low (indeed dwindled to almost 
> 0) and I could hear the disk working hard, so while I had expected the 
> CompactNodeIndex to be a bottleneck, the indication in my environments is 
> that it was I/O bound.  I let the Mac version run on for _hours_ after 
> sending the results yesterday, and even though I’d configured the heap at 
> 2Gb, the graph of heap space allocation as shown by jconsole seemed to 
> approach some limit around ~1Gb asymptotically.  I speculated that Neo4j was 
> being a ‘good heap citizen’ and limiting itself to how much heap it used and 
> as a consequence was spending forever doing I/O to create the relationships.  
> Your tuning tips might help here.
> 
> However, I also experimented using the CompactNodeIndex in my domain specific 
> restore program to avoid the neo4j  index overhead.  This builds a graph of 
> 6239722nodes and 17829082relationships.  This graph places all nodes of the 
> same type into ‘collections’ in its first phase prior to building the 
> relationships between entity types in its second phase.  So initially, to 
> avoid holding all the CompactNodeIndex’s in memory, I populated the 
> CompactNodeIndex’s in the second phase for each entity-pair by reading the 
> collections back as needed.  But again I found when populating this for large 
> collections the system ground to a halt and never finished.  So I changed the 
> approach and built the CompactNodeIndex’s as the nodes are created and held 
> onto all of them for the second relationship building phase.  I reset Neo4j 
> prior to the second phase, and using the retained CompactNodeIndex’s was able 
> to successfully complete the graph population in about 87 mins, with a peak 
> of 865.5mb heap.  I also experimented with not building Neo4j indexes in the 
> first phase for the larger collections which reduced the time to 64 mins.  I 
> don’t know the internal details of Neo4j, but the key distinguishing 
> characteristic from my perspective of these successful runs is that it is 
> constructing relationships without the application having to actually access 
> the nodes or indexes.
> 
> My observations using jconsole of these more successful runs do imply that it 
> becomes CPU bound at times, which would be consistent with your profile 
> observations – i.e. in a configuration where you have enough memory for 
> whatever you’re doing then it’s likely that CompactNodeIndex is a major 
> consumer of CPU.  I suspect much of its overhead arises from allocating 
> NodeIdPair’s,ByteArrayInputStream, DataInputStream as it chops its way thru, 
> so as I need to be able to run these data loads in a fairly memory 
> constrained environment I will experiment with an alternative implementation 
> that avoids object allocation.  If your profiling suggests otherwise, I’d 
> appreciate any input on where the time goes.
> 
> 
> Regards,
> 
> 
> 
> Paul
> 
> From: Mic

Re: [Neo4j] Auto Indexing for Neo4j

2011-06-14 Thread Peter Neubauer
Yes,
configuration and indexing via REST is the next step for this.

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jun 14, 2011 at 7:25 PM, Aseem Kishore  wrote:
> Awesome to hear, and great work! Will we be able to configure+use this from
> the REST API?
>
> Cheers,
> Aseem
>
> On Tue, Jun 14, 2011 at 8:30 AM, Chris Gioran <
> chris.gio...@neotechnology.com> wrote:
>
>> Good news everyone,
>>
>> A request that's often come up on the mailing list is a mechanism for
>> automatically indexing properties of nodes and relationships.
>>
>> As of today's SNAPSHOT, auto-indexing is part of Neo4j which means nodes
>> and relationships can now be indexed based on convention, requiring
>> far less effort and code from the developer's point of view.
>>
>> Getting hold of an automatic index is straightforward:
>>
>> AutoIndexer nodeAutoIndexer = graphDb.index().getNodeAutoIndexer();
>> AutoIndex nodeAutoIndex = nodeAutoIndexer.getAutoIndex();
>>
>> Once you've got an instance of AutoIndex, you can use it as a read-only
>> Index.
>>
>> The AutoIndexer interface also supports runtime changes and
>> enabling/disabling the auto indexing functionality.
>>
>> To support the new features, there are new Config
>> options you can pass to the startup configuration map in
>> EmbeddedGraphDatabase, the most important of which are:
>>
>> Config.NODE_AUTO_INDEXING (defaults to "false")
>> Config.RELATIONSHIP_AUTO_INDEXING (defaults to "false")
>>
>> If set to "true" (independently of each other) these properties will
>> enable auto indexing functionality and at the successful finish() of
>> each transaction, all newly added properties on the primitives for which
>> auto indexing is enabled will be added to a special AutoIndex (and
>> deleted or changed properties will be updated accordingly too).
>>
>> There are options for fine grained control to determine
>> properties are indexed, default behaviors and so forth. For example, by
>> default all properties are indexed. If you want only properties "name" and
>> "age" for Nodes and "since" and "until" for Relationships
>> to be auto indexed, simply set the initial configuration as follows:
>>
>> Config.NODE_KEYS_INDEXABLE = "name, age";
>> Config.RELATIONSHIP_KEYS_INDEXABLE="since, until";
>>
>> For the semantics of the auto-indexing operations, constraints and more
>> detailed examples, see the documentation available  at
>>
>> http://docs.neo4j.org/chunked/1.4-SNAPSHOT/auto-indexing.html
>>
>> We're pretty excited about this feature since we think it'll make your
>> lives
>> as developers much more productive in a range of use-cases. If you're
>> comfortable with using SNAPSHOT versions of Neo4j, please try it out
>> and let us know what you think - we'd really value your feedback.
>>
>> If you're happier with using packaged milestones then this feature
>> will be available from 1.4 M05 in a couple of weeks from now.
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Auto Indexing for Neo4j

2011-06-14 Thread Peter Neubauer
Craig,
the autoindexing is one step in this direction. The other is to enable
the Spatial and other in-graph indexes like the graph-collections
(timeline etc) at all to be treated like normal index providers. When
that is done (will talk to Mattias who is coming back from vacation
tomorrow on that), we are in a position to think about more complex
autoindex providers.

Also, the possibility to treat Neo4j Spatial and other graph
structures as index providers, would hook into the index framework and
expose things to higher level queries like Cypher and Gremlin, e.g.
combining a spatial bounding box geometry search with a graph
traversal for suitable properties that are less than 2 kilometers from
the nearest school, sorting the results, returning only price and lat
as columns, the 3 topmost hits.

START geom = (index:spatial:'BBOX(the_geom, -90, 40, -60, 45)')
MATCH (geom)-->(fast), (fast)-[r, :NEAR]-(school)
WHERE fast.roooms>4 AND school.classes>4 AND r.length<2return
fast.pic?, fast.lon?, fast.lat?
SORT BY fast.price, fast.lat^
SLICE 3

So, I think the next step is to make in-graph indexing structures plug
into the index framework, and then into autoindexing :)


Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jun 14, 2011 at 5:49 PM, Craig Taverner  wrote:
> This is great news.
>
> Now I'm really curious about the next step, and that is allowing indexes
> other than lucene. For example, the RTree index in neo4j-spatial was never
> possible to wrap behind the normal index API, because that was designed only
> for properties of nodes (and relationships), but the RTree is based on
> something completely different (complete spatial geometries). However, the
> new auto-indexing feature implies that any node can be added to an index
> without the developer needing to know anything about the index API. Instead
> the index needs to know if the node is appropriate for indexing. This is
> suitable for both lucene and the RTree.
>
> So what I'd like to see is that when configuring auto-indexing in the first
> place, instead of just specifying properties to index, specify some indexer
> implementation that can be created and run internally. For example, perhaps
> you pass the classname of some class that implements some necessary
> interface, and then that is instantiated, passed config properties, and used
> to index new or modified nodes. One method I could imagine this interface
> having would be a listener for change events to be evaluated for whether or
> not the index should be activated for a node change. For the lucene property
> index, this method would return true if the property exists on that node.
> For the RTree this method would return true if the node contained the
> meta-data required for neo4j-spatial to recognize it as a spatial type?
> Alternatively just an index method that does nothing when the nodes are not
> to be indexed, and indexes when necessary?
>
> So, are we now closer to having this kind of support?
>
> On Tue, Jun 14, 2011 at 11:30 PM, Chris Gioran <
> chris.gio...@neotechnology.com> wrote:
>
>> Good news everyone,
>>
>> A request that's often come up on the mailing list is a mechanism for
>> automatically indexing properties of nodes and relationships.
>>
>> As of today's SNAPSHOT, auto-indexing is part of Neo4j which means nodes
>> and relationships can now be indexed based on convention, requiring
>> far less effort and code from the developer's point of view.
>>
>> Getting hold of an automatic index is straightforward:
>>
>> AutoIndexer nodeAutoIndexer = graphDb.index().getNodeAutoIndexer();
>> AutoIndex nodeAutoIndex = nodeAutoIndexer.getAutoIndex();
>>
>> Once you've got an instance of AutoIndex, you can use it as a read-only
>> Index.
>>
>> The AutoIndexer interface also supports runtime changes and
>> enabling/disabling the auto indexing functionality.
>>
>> To support the new features, there are new Config
>> options you can pass to the startup configuration map in
>> EmbeddedGraphDatabase, the most important of which are:
>>
>> Config.NODE_AUTO_INDEXING (defaults to "false")
>> Config.RELATIONSHIP_AUTO_INDEXING (defaults to "false")
>>
>> If set to "true" (independently of each other) these properties will
>> enable auto indexing functionality and at the successful finish() of
>> each transaction, all newly added properties on the primitives for which
>> auto indexing is enabled will be added to a special AutoIndex (and
>> deleted or changed properties will be updated accordingly too).
>>
>> There are options for fine grained control to determine
>> properties are indexed, default behaviors and so for

Re: [Neo4j] Archiving in time / being able to quickly refer to a historical state

2011-06-14 Thread Michael Hunger
Patrick,

David Montag created a versioned graph approach on github: 
https://github.com/dmontag/neo4j-versioning

Perhaps you can take some inspiration from that.

Otherwise: 
Books and Elements are nodes, effects would be relationships which have a 
timestamp (probably indexed).

The relationship between book - [:CONTAINS]-> element would have a validity 
time-span. (It is started and open-ended when the element is added and closed 
when the element is removed.

The you could traverse any book along its CONTAINS relationships while taking 
the time-span property into account for a concrete timestamp.

You might choose to add the effect information as additional relationships 
between books and elements but perhaps it is enough to add those to appropriate 
properties of the CONTAINS relationship.

Are there other effects as well?
Is it possible to change the content of an element? (that would complicate the 
matter)
Otherwise if that is realized as remove the old element and add the new one 
this would suffice.

Addtionally it could be interesting to have links between related elements 
(either structural links - part -> chapter -> section -> paragraph | image | 
figure | table) or historical, i.e. link elements that replace other to those.

HTH

Michael

Am 14.06.2011 um 21:14 schrieb Patrik Sundberg:

> I should probably put in some estimates of the sort of orders of magnitude
> of data involved:
> Books are in the 100s
> Effects are in the 10,000s / day
> Elements are in the 100s / Book
> 
> On Tue, Jun 14, 2011 at 8:07 PM, Patrik Sundberg
> wrote:
> 
>> Hi,
>> 
>> Design question:
>> I have a Book. A book has Elements. To change what Elements are in a Book
>> there are Effects. An Effect adds or deletes an element from a Book (and has
>> other info). Everyday I archive the state of a Book so that I can easily get
>> the state of the Book (it's Elements) at a historical point in time. The
>> number of elements and which elements are in a Book vary from day to day
>> depending on the Effects taking place in the time period.
>> 
>> So it's a bit like "Book contents archive of day X + 1 = Book contents
>> archive of day X + the Effects between X and X + 1"
>> 
>> There's no need to represent the daily archives in any way, it's the
>> functionality of having historical snapshots that matter to me, so that one
>> can easily get the state of a Book at any point in time by finding the
>> closest archive point before the time and applying the Effects from that
>> archive timestamp and the point of interest.
>> 
>> Ideally want to keep a long time history of Book state and Effects.
>> 
>> Any ideas for an effecient of organizing this in a graph friendly way?
>> 
>> Thanks,
>> Patrik
>> 
>> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Bug in Lucene Timeline Index (all versions, I think)

2011-06-14 Thread Peter Neubauer
Rick,
created a ticket for it, will try to write a testcase for it tomorrow
and track it. We are testing Lighthouse for tickets, see
http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/8-make-querying-before-1970-in-lucene-timeline-possible

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jun 14, 2011 at 8:49 PM, Rick Bullotta
 wrote:
> If no lower bound is provided on a LuceneTimeline query, a default value of 
> 0L is used.  This will not allow querying of values prior to January 1st, 
> 1970.  Perhaps it should be -Long.MAX_VALUE instead?
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Auto Indexing for Neo4j

2011-06-14 Thread Michael Hunger
A problem with a "probably dumb" index in a graph that I created for an 
experiment was the
performance of getAllRelationships on that machine (it was a very large graph 
with all nodes being indexed).

It was a mapping from long values to nodes, my simplistic approach just chopped 
the long values into chunks of 3 digits and used those 3 digits as 
relationship-types (i.e. 1000 additional rel-types).
to form a tree which pointed to the node in question at the end.

Will have to investigate that further.


Am 14.06.2011 um 23:43 schrieb Peter Neubauer:

> Craig,
> the autoindexing is one step in this direction. The other is to enable
> the Spatial and other in-graph indexes like the graph-collections
> (timeline etc) at all to be treated like normal index providers. When
> that is done (will talk to Mattias who is coming back from vacation
> tomorrow on that), we are in a position to think about more complex
> autoindex providers.
> 
> Also, the possibility to treat Neo4j Spatial and other graph
> structures as index providers, would hook into the index framework and
> expose things to higher level queries like Cypher and Gremlin, e.g.
> combining a spatial bounding box geometry search with a graph
> traversal for suitable properties that are less than 2 kilometers from
> the nearest school, sorting the results, returning only price and lat
> as columns, the 3 topmost hits.
> 
> START geom = (index:spatial:'BBOX(the_geom, -90, 40, -60, 45)')
> MATCH (geom)-->(fast), (fast)-[r, :NEAR]-(school)
> WHERE fast.roooms>4 AND school.classes>4 AND r.length<2return
> fast.pic?, fast.lon?, fast.lat?
> SORT BY fast.price, fast.lat^
> SLICE 3
> 
> So, I think the next step is to make in-graph indexing structures plug
> into the index framework, and then into autoindexing :)
> 
> 
> Cheers,
> 
> /peter neubauer
> 
> GTalk:  neubauer.peter
> Skype   peter.neubauer
> Phone   +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter  http://twitter.com/peterneubauer
> 
> http://www.neo4j.org   - Your high performance graph database.
> http://startupbootcamp.org/- Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> 
> 
> 
> On Tue, Jun 14, 2011 at 5:49 PM, Craig Taverner  wrote:
>> This is great news.
>> 
>> Now I'm really curious about the next step, and that is allowing indexes
>> other than lucene. For example, the RTree index in neo4j-spatial was never
>> possible to wrap behind the normal index API, because that was designed only
>> for properties of nodes (and relationships), but the RTree is based on
>> something completely different (complete spatial geometries). However, the
>> new auto-indexing feature implies that any node can be added to an index
>> without the developer needing to know anything about the index API. Instead
>> the index needs to know if the node is appropriate for indexing. This is
>> suitable for both lucene and the RTree.
>> 
>> So what I'd like to see is that when configuring auto-indexing in the first
>> place, instead of just specifying properties to index, specify some indexer
>> implementation that can be created and run internally. For example, perhaps
>> you pass the classname of some class that implements some necessary
>> interface, and then that is instantiated, passed config properties, and used
>> to index new or modified nodes. One method I could imagine this interface
>> having would be a listener for change events to be evaluated for whether or
>> not the index should be activated for a node change. For the lucene property
>> index, this method would return true if the property exists on that node.
>> For the RTree this method would return true if the node contained the
>> meta-data required for neo4j-spatial to recognize it as a spatial type?
>> Alternatively just an index method that does nothing when the nodes are not
>> to be indexed, and indexes when necessary?
>> 
>> So, are we now closer to having this kind of support?
>> 
>> On Tue, Jun 14, 2011 at 11:30 PM, Chris Gioran <
>> chris.gio...@neotechnology.com> wrote:
>> 
>>> Good news everyone,
>>> 
>>> A request that's often come up on the mailing list is a mechanism for
>>> automatically indexing properties of nodes and relationships.
>>> 
>>> As of today's SNAPSHOT, auto-indexing is part of Neo4j which means nodes
>>> and relationships can now be indexed based on convention, requiring
>>> far less effort and code from the developer's point of view.
>>> 
>>> Getting hold of an automatic index is straightforward:
>>> 
>>> AutoIndexer nodeAutoIndexer = graphDb.index().getNodeAutoIndexer();
>>> AutoIndex nodeAutoIndex = nodeAutoIndexer.getAutoIndex();
>>> 
>>> Once you've got an instance of AutoIndex, you can use it as a read-only
>>> Index.
>>> 
>>> The AutoIndexer interface also supports runtime changes and
>>> enabling/disabling the auto indexing functionality.
>>> 
>>> To support the new features, there are new Conf

Re: [Neo4j] Bug in Lucene Timeline Index (all versions, I think)

2011-06-14 Thread Peter Neubauer
Rick,
could create a test case and fix it exactly as you suggested,
https://github.com/neo4j/community/commit/807d5f7df51b91150fe4349108c3f34af871b6b4

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jun 14, 2011 at 11:55 PM, Peter Neubauer
 wrote:
> Rick,
> created a ticket for it, will try to write a testcase for it tomorrow
> and track it. We are testing Lighthouse for tickets, see
> http://neo4jdb.lighthouseapp.com/projects/77609-neo4j-community/tickets/8-make-querying-before-1970-in-lucene-timeline-possible
>
> Cheers,
>
> /peter neubauer
>
> GTalk:      neubauer.peter
> Skype       peter.neubauer
> Phone       +46 704 106975
> LinkedIn   http://www.linkedin.com/in/neubauer
> Twitter      http://twitter.com/peterneubauer
>
> http://www.neo4j.org               - Your high performance graph database.
> http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Tue, Jun 14, 2011 at 8:49 PM, Rick Bullotta
>  wrote:
>> If no lower bound is provided on a LuceneTimeline query, a default value of 
>> 0L is used.  This will not allow querying of values prior to January 1st, 
>> 1970.  Perhaps it should be -Long.MAX_VALUE instead?
>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>>
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Query Number of Nodes with Property Filter

2011-06-14 Thread Romiko Derbynew
Thank you for the response. Indeed for now we doing this, and perhaps will take 
the advice to have category nodes.

var gremlinQuery = @"g.V.outE[[label:'HOSTS']].inV[['Key':'ACME']]";

Again, much appreciated for the tips.
Romiko

-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Michael Hunger
Sent: Wednesday, 15 June 2011 1:42 AM
To: Neo4j user discussions
Subject: Re: [Neo4j] Query Number of Nodes with Property Filter

you can use category nodes to connect nodes of a certain type to.

then you can count the nodes using a traversal

you dont have to go via an index to do things like that


Sent from my iBrick4


Am 14.06.2011 um 17:10 schrieb Marko Rodriguez :

> Hi,
> 
>> Is it possible that when we create the Automatic Index, that we can filter 
>> it on specific nodes?
> 
> No.
> 
>> Referring to the diagram below, we have a Node with a property _Type= 
>> Agency. I would like to create an index (aidx-agency-key) based on Key but 
>> only for the Nodes with _Type=Agency.
>> So, pseudo code would be:
>> g.createAutomaticIndex('myIndex', Vertex.class, new pair[,] 
>> {Node._Type=Agency},“Key”)
>> 
>> Is this the right approach, or are we doing something wrong
> 
> You can't do that with AutomaticIndices.
> 
>> The solution we want is to be able to count all the Nodes in the database 
>> with a property _Type=Agency and property Key=”myKey” or to checking the 
>> existence of a Node  with _Type=”Agency” and Key=”myKey”.
> 
> Yea. The not so efficient way to do that is:
> 
> g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
> 
> 1. get agencies
> 2. iterate and filter out those whose key doesn't equal 'myKey'
> 3. count up what gets emitted from the pipeline.
> 
> Perhaps Neo4j guys can help as there are some things with Lucene indices and 
> the 'AND' clause. Given that AutomaticIndex, when used with Neo4jGraph, is 
> just a wrapper to Lucene, I believe you can do stuff like '_Type AND 
> Key=myKey' ? -- I've never done it so I don't know... Rick, on this list, 
> knows the ins and outs of indices 
> 
>> 
>> and to do a count or check if it exists would be multiple filters 
>> g.V[[_Typey:Agency],[ Name:Acme]].count()
> 
> Yea, thats a bit excessive -- too many things to iterate through. You can do 
> the previous:
>g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
> 
>> 
> 
> Good luck,
> Marko.
> 
> http://markorodriguez.com
> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Archiving in time / being able to quickly refer to a historical state

2011-06-14 Thread Patrik Sundberg
Yes, the archive is a roll up of effects. And it's mostly for
efficiency, so that one does not have to go through all the millions
of effects to get the state of a given point in time but can start
from a known state and just add 10s of thousands of effects between
archive times.

On 14 Jun 2011, at 21:28, McKinley  wrote:

> Can you describe what you mean by archiving the state of the book each day?
> It seems that you have a transactional system with your effects and an
> archive at a point in time just seems like the range of effects by date. Is
> an archive a roll-up of the effects for efficiency or backup?
>
> Cheers,
>
> McKinley
>
> On Tue, Jun 14, 2011 at 12:14 PM, Patrik Sundberg > wrote:
>>
>>> Design question:
>>> I have a Book. A book has Elements. To change what Elements are in a Book
>>> there are Effects. An Effect adds or deletes an element from a Book (and
>> has
>>> other info). Everyday I archive the state of a Book so that I can easily
>> get
>>> the state of the Book (it's Elements) at a historical point in time. The
>>> number of elements and which elements are in a Book vary from day to day
>>> depending on the Effects taking place in the time period.
>>>
>>> So it's a bit like "Book contents archive of day X + 1 = Book contents
>>> archive of day X + the Effects between X and X + 1"
>>>
>>> There's no need to represent the daily archives in any way, it's the
>>> functionality of having historical snapshots that matter to me, so that
>> one
>>> can easily get the state of a Book at any point in time by finding the
>>> closest archive point before the time and applying the Effects from that
>>> archive timestamp and the point of interest.
>>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Archiving in time / being able to quickly refer to a historical state

2011-06-14 Thread Patrik Sundberg
On 14 Jun 2011, at 22:51, Michael Hunger
 wrote:

> Patrick,
>
> David Montag created a versioned graph approach on github: 
> https://github.com/dmontag/neo4j-versioning
>
> Perhaps you can take some inspiration from that.

I'll take a look, thanks.

> Otherwise:
> Books and Elements are nodes, effects would be relationships which have a 
> timestamp (probably indexed).
>
> The relationship between book - [:CONTAINS]-> element would have a validity 
> time-span. (It is started and open-ended when the element is added and closed 
> when the element is removed.
>
> The you could traverse any book along its CONTAINS relationships while taking 
> the time-span property into account for a concrete timestamp.
>
> You might choose to add the effect information as additional relationships 
> between books and elements but perhaps it is enough to add those to 
> appropriate properties of the CONTAINS relationship.
>

I'll have millions of effects but thousands of elements for a book so
seems a bit inefficient. Wouldn't something like an intermediate layer
of nodes of ElementSet (timestamped) make sense instead? A book has
many element sets and an element set has many elements. Effects
dictate how element sets evolve over time.

> Are there other effects as well?
> Is it possible to change the content of an element? (that would complicate 
> the matter)
> Otherwise if that is realized as remove the old element and add the new one 
> this would suffice.
>
> Addtionally it could be interesting to have links between related elements 
> (either structural links - part -> chapter -> section -> paragraph | image | 
> figure | table) or historical, i.e. link elements that replace other to those.
>

Nope, no other effects and effects can't change (would be remove and
readd to amend).

My domain is not documents but trading. So my books are a logical
organisation of security holdings, my elements securities and my
effects trades. Archiving holdings a way of being more efficient of
finding the holding at a given point in time without having to process
too many trades.

P

> HTH
>
> Michael
>
> Am 14.06.2011 um 21:14 schrieb Patrik Sundberg:
>
>> I should probably put in some estimates of the sort of orders of magnitude
>> of data involved:
>> Books are in the 100s
>> Effects are in the 10,000s / day
>> Elements are in the 100s / Book
>>
>> On Tue, Jun 14, 2011 at 8:07 PM, Patrik Sundberg
>> wrote:
>>
>>> Hi,
>>>
>>> Design question:
>>> I have a Book. A book has Elements. To change what Elements are in a Book
>>> there are Effects. An Effect adds or deletes an element from a Book (and has
>>> other info). Everyday I archive the state of a Book so that I can easily get
>>> the state of the Book (it's Elements) at a historical point in time. The
>>> number of elements and which elements are in a Book vary from day to day
>>> depending on the Effects taking place in the time period.
>>>
>>> So it's a bit like "Book contents archive of day X + 1 = Book contents
>>> archive of day X + the Effects between X and X + 1"
>>>
>>> There's no need to represent the daily archives in any way, it's the
>>> functionality of having historical snapshots that matter to me, so that one
>>> can easily get the state of a Book at any point in time by finding the
>>> closest archive point before the time and applying the Effects from that
>>> archive timestamp and the point of interest.
>>>
>>> Ideally want to keep a long time history of Book state and Effects.
>>>
>>> Any ideas for an effecient of organizing this in a graph friendly way?
>>>
>>> Thanks,
>>> Patrik
>>>
>>>
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Cannot find a path

2011-06-14 Thread Josh Adell
Thank you, Peter, that was exactly it.  Yeah, I didn't realize that the max
depth defaulted to 1.  For now, I guess the library I'm writing will have to
support "max depth" and "max_depth" since I won't always know what version
it will be running against.

Thanks again,
Josh Adel

Message: 4
> Date: Tue, 14 Jun 2011 16:35:07 +0200
> From: Peter Neubauer 
> Subject: Re: [Neo4j] Cannot find a path
> To: Neo4j user discussions 
> Message-ID: 
> Content-Type: text/plain; charset=ISO-8859-1
>
> Josh,
>
> you need to spcify the "max depth" parameter for the algo, which
> defaults to 1 and thus is not gaining any results. I am pushing
> documentation on this, and I am changing this to "max_depth", but for
> the time being, it is something like
>
> "{\"to\": \"http://localhost:7474/db/data/node/"+data.get().get( "him"
> ).getId()+"\"" +
>",\"max depth\":2}"
>
> Does that work?
>
> Cheers,
>
> /peter neubauer
>
> GTalk:? ? ? neubauer.peter
> Skype? ? ?? peter.neubauer
> Phone? ? ?? +46 704 106975
> LinkedIn?? http://www.linkedin.com/in/neubauer
> Twitter? ? ? http://twitter.com/peterneubauer
>
> http://www.neo4j.org? ? ? ? ? ? ?? - Your high performance graph database.
> http://startupbootcamp.org/ ? ?- ?resund - Innovation happens HERE.
> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>
>
>
> On Tue, Jun 14, 2011 at 2:55 PM, Peter Neubauer
>  wrote:
> > Josh,
> > working on it ...
> >
> > Cheers,
> >
> > /peter neubauer
> >
> > GTalk:? ? ? neubauer.peter
> > Skype? ? ?? peter.neubauer
> > Phone? ? ?? +46 704 106975
> > LinkedIn?? http://www.linkedin.com/in/neubauer
> > Twitter? ? ? http://twitter.com/peterneubauer
> >
> > http://www.neo4j.org? ? ? ? ? ? ?? - Your high performance graph
> database.
> > http://startupbootcamp.org/ ? ?- ?resund - Innovation happens HERE.
> > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
> >
> >
> >
> > On Tue, Jun 14, 2011 at 2:44 PM, Josh Adell 
> wrote:
> >> Hello all, sorry for the re-post, but I am still stuck. ?Does anyone
> have an
> >> idea about what I may be doing wrong, or is there any more information I
> can
> >> provide to help diagnose?
> >>
> >> Thanks!
> >>
> >> -- Josh Adell
> >>
> >>> --
> >>>
> >>> Message: 6
> >>> Date: Sun, 12 Jun 2011 14:17:17 -0400
> >>> From: Josh Adell 
> >>> Subject: [Neo4j] Cannot find a path
> >>> To: user@lists.neo4j.org
> >>> Message-ID: 
> >>> Content-Type: text/plain; charset=ISO-8859-1
> >>>
> >>> Hello all,
> >>>
> >>> I recently began exploring Neo4j REST interface, and I am having a
> problem
> >>> finding paths between nodes.
> >>> I am using neo4j-community-1.4.M03
> >>>
> >>> My nodes and relationships look like this (verified using the webadmin
> >>> interface):
> >>>
> >>> (1: Node A) IN> (3: Node C)  >>>
> >>> Using curl, I can query from node A to C:
> >>> 
> >>> $ curl -i -HAccept:application/json -HContent-Type:application/json -X
> POST
> >>> -d '{"to":"http://localhost:7474/db/data/node/3"}'
> >>> http://localhost:7474/db/data/node/1/path
> >>> HTTP/1.1 200 OK
> >>> Content-Length: 292
> >>> Content-Encoding: UTF-8
> >>> Content-Type: application/json
> >>> Access-Control-Allow-Origin: *
> >>> Server: Jetty(6.1.25)
> >>>
> >>> {
> >>> ?"start" : "http://localhost:7474/db/data/node/1";,
> >>> ?"nodes" : [ "http://localhost:7474/db/data/node/1";, "
> >>> http://localhost:7474/db/data/node/3"; ],
> >>> ?"length" : 1,
> >>> ?"relationships" : [ "http://localhost:7474/db/data/relationship/5"; ],
> >>> ?"end" : "http://localhost:7474/db/data/node/3";
> >>> }
> >>> 
> >>> I get similar results for querying for paths from B to C.
> >>>
> >>> But when I try to get a path from A to B (which is through C), I get an
> >>> empty result set:
> >>> 
> >>> $ curl -HAccept:application/json -HContent-Type:application/json -i -X
> POST
> >>> -d '{"to":"http://localhost:7474/db/data/node/2"}'
> >>> http://localhost:7474/db/data/node/1/path
> >>> HTTP/1.1 404 Not Found
> >>> Access-Control-Allow-Origin: *
> >>> Content-Type: text/html; charset=iso-8859-1
> >>> Cache-Control: must-revalidate,no-cache,no-store
> >>> Content-Length: 1385
> >>> Server: Jetty(6.1.25)
> >>>
> >>> 
> >>> 
> >>> 
> >>> Error 404 Not Found
> >>> 
> >>> HTTP ERROR 404
> >>> Problem accessing /db/data/node/1/path. Reason:
> >>>  ? ?Not FoundPowered by
> >>> Jetty://
> >>> 
> >>> 
> >>> 
> >>> 
> >>>
> >>> Querying "paths" from A to C returns a JSON encoded array containing
> the
> >>> one
> >>> path, but "paths" from A to B returns an empty array ("[ ]").
> >>>
> >>> Can anyone see anything wrong with my setup or the way I am querying?
> ?This
> >>> seem like pretty basic functionality, so I'm assuming I'm just doing
> >>> something incorrectly.
> >>>
> >>> Thanks in advance for any help!
> >>>
> >>> -- Josh Adell
> >>>
> >>>

[Neo4j] Invitation to connect on LinkedIn

2011-06-14 Thread Erdenezul Batmunkh via LinkedIn
LinkedIn





Erdenezul Batmunkh requested to add you as a connection on LinkedIn:
  
--

Craig,

I'd like to add you to my professional network on LinkedIn.

- Erdenezul

Accept invitation from Erdenezul Batmunkh
http://www.linkedin.com/e/5gyj7a-goxq4eey-3a/h9LPQ_TdyUOQHKzIpND15vYO56OQOUsn/blk/I154102920_9/pmpxnSRJrSdvj4R5fnhv9ClRsDgZp6lQs6lzoQ5AomZIpn8_elYMczAOc34Qdj59bSdntnsRrTdhbP0OdPwPcjANczcLrCBxbOYWrSlI/EML_comm_afe/

View invitation from Erdenezul Batmunkh
http://www.linkedin.com/e/5gyj7a-goxq4eey-3a/h9LPQ_TdyUOQHKzIpND15vYO56OQOUsn/blk/I154102920_9/0VnP0Oej8McjgRckALqnpPbOYWrSlI/svi/
 

--
DID YOU KNOW you can use your LinkedIn profile as your website? Select a vanity 
URL and then promote this address on your business cards, email signatures, 
website, etc
http://www.linkedin.com/e/5gyj7a-goxq4eey-3a/ewp/inv-21/


 
-- 
(c) 2011, LinkedIn Corporation
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Which version of neo4j does spring data graph project use ?

2011-06-14 Thread Vipul Gupta
Michael,

I don't see anything released on maven repo yet?
Please update.

-VIpul

On Fri, Jun 10, 2011 at 3:40 PM, Michael Hunger
 wrote:
> Wait for our spring data graph 1.1.0.M1 release on Monday :)
>
> it will be updated to Neo4j 1.4.M04
>
> Cheers
>
> Michael
>
> Am 10.06.2011 um 11:55 schrieb Vipul Gupta:
>
>> Please let me know..
>> I want to use the latest version of neo4j say " Neo4j 1.4 M03 “Kiruna
>> " with spring data graph. WHat do I do ?
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Query Number of Nodes with Property Filter

2011-06-14 Thread Michael Hunger
just describe your domain and your use-cases for usage and the graph model you 
developed and we can discuss it.

Michael

Sent from my iBrick4


Am 15.06.2011 um 02:43 schrieb Tatham Oddie :

> Hi Michael,
> 
> (Warning: graph db n00b disclaimer still applies)
> 
> Category nodes are an interesting approach.
> 
> Would you mind validating the graph we've come up with to make sure we're on 
> the right track?
> 
> 
> -- Tatham
> 
> 
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
> Behalf Of Michael Hunger
> Sent: Wednesday, 15 June 2011 1:42 AM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Query Number of Nodes with Property Filter
> 
> you can use category nodes to connect nodes of a certain type to.
> 
> then you can count the nodes using a traversal
> 
> you dont have to go via an index to do things like that
> 
> 
> Sent from my iBrick4
> 
> 
> Am 14.06.2011 um 17:10 schrieb Marko Rodriguez :
> 
>> Hi,
>> 
>>> Is it possible that when we create the Automatic Index, that we can filter 
>>> it on specific nodes?
>> 
>> No.
>> 
>>> Referring to the diagram below, we have a Node with a property _Type= 
>>> Agency. I would like to create an index (aidx-agency-key) based on Key but 
>>> only for the Nodes with _Type=Agency.
>>> So, pseudo code would be:
>>> g.createAutomaticIndex('myIndex', Vertex.class, new pair[,] 
>>> {Node._Type=Agency},“Key”)
>>> 
>>> Is this the right approach, or are we doing something wrong
>> 
>> You can't do that with AutomaticIndices.
>> 
>>> The solution we want is to be able to count all the Nodes in the database 
>>> with a property _Type=Agency and property Key=”myKey” or to checking the 
>>> existence of a Node  with _Type=”Agency” and Key=”myKey”.
>> 
>> Yea. The not so efficient way to do that is:
>> 
>> g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
>> 
>> 1. get agencies
>> 2. iterate and filter out those whose key doesn't equal 'myKey'
>> 3. count up what gets emitted from the pipeline.
>> 
>> Perhaps Neo4j guys can help as there are some things with Lucene indices and 
>> the 'AND' clause. Given that AutomaticIndex, when used with Neo4jGraph, is 
>> just a wrapper to Lucene, I believe you can do stuff like '_Type AND 
>> Key=myKey' ? -- I've never done it so I don't know... Rick, on this list, 
>> knows the ins and outs of indices 
>> 
>>> 
>>> and to do a count or check if it exists would be multiple filters 
>>> g.V[[_Typey:Agency],[ Name:Acme]].count()
>> 
>> Yea, thats a bit excessive -- too many things to iterate through. You can do 
>> the previous:
>>   g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
>> 
>>> 
>> 
>> Good luck,
>> Marko.
>> 
>> http://markorodriguez.com
>> 
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Which version of neo4j does spring data graph project use ?

2011-06-14 Thread Michael Hunger
#1 is what thomas and I are working on
first w/ jruby for the heroku deployment
if all works well next week with genersl scripting language support

don't know if we ever go the java jar upload approch (b/c of 
redeployment/classloader leak issues)
couchbase java view servers for instance allow that

Michael

Sent from my iBrick4


Am 15.06.2011 um 05:42 schrieb Vipul Gupta :

> Michael,
> 
> I don't see anything released on maven repo yet?
> Please update.
> 
> -VIpul
> 
> On Fri, Jun 10, 2011 at 3:40 PM, Michael Hunger
>  wrote:
>> Wait for our spring data graph 1.1.0.M1 release on Monday :)
>> 
>> it will be updated to Neo4j 1.4.M04
>> 
>> Cheers
>> 
>> Michael
>> 
>> Am 10.06.2011 um 11:55 schrieb Vipul Gupta:
>> 
>>> Please let me know..
>>> I want to use the latest version of neo4j say " Neo4j 1.4 M03 “Kiruna
>>> " with spring data graph. WHat do I do ?
>>> ___
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>> 
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Query Number of Nodes with Property Filter

2011-06-14 Thread Tatham Oddie
We're building a client and case management system for social work agencies.

It will be a multitenant system, hosting multiple agencies.

Agencies have a name "Acme Agency Australia" and a key "acme" that is used in 
places like URLs (http://thesystem.org/acme).

Users are scoped to agencies. Usernames need to be unique within agencies.

When a user logs in, they will complete three fields - agency key ("acme"), 
username ("tatham"), password. We need to find that user, within the scope of 
that agency to validate their login.

Another group of users are scoped to the entire system - they are the system 
wide administrators. They only operate at a system level.

We need to be *really* careful about separating each agency's data. I'm 
currently thinking along the lines that when a user logs in, and we resolve the 
agency node they belong to, we'd store a handle/reference to that agency node 
in their session/auth ticket/somewhere. We'd then architect all of our data 
access services to always commence their queries from this agency node. 
Basically promoting the agency nodes to reference nodes in the context of each 
session.

Currently we're just dealing with agencies and users as our first features, 
then will start building out client management.

(Architecturally, we're building in .NET via the REST API.)


-- Tatham


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Michael Hunger
Sent: Wednesday, 15 June 2011 2:54 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Query Number of Nodes with Property Filter

just describe your domain and your use-cases for usage and the graph model you 
developed and we can discuss it.

Michael

Sent from my iBrick4


Am 15.06.2011 um 02:43 schrieb Tatham Oddie :

> Hi Michael,
> 
> (Warning: graph db n00b disclaimer still applies)
> 
> Category nodes are an interesting approach.
> 
> Would you mind validating the graph we've come up with to make sure we're on 
> the right track?
> 
> 
> -- Tatham
> 
> 
> -Original Message-
> From: user-boun...@lists.neo4j.org 
> [mailto:user-boun...@lists.neo4j.org] On Behalf Of Michael Hunger
> Sent: Wednesday, 15 June 2011 1:42 AM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Query Number of Nodes with Property Filter
> 
> you can use category nodes to connect nodes of a certain type to.
> 
> then you can count the nodes using a traversal
> 
> you dont have to go via an index to do things like that
> 
> 
> Sent from my iBrick4
> 
> 
> Am 14.06.2011 um 17:10 schrieb Marko Rodriguez :
> 
>> Hi,
>> 
>>> Is it possible that when we create the Automatic Index, that we can filter 
>>> it on specific nodes?
>> 
>> No.
>> 
>>> Referring to the diagram below, we have a Node with a property _Type= 
>>> Agency. I would like to create an index (aidx-agency-key) based on Key but 
>>> only for the Nodes with _Type=Agency.
>>> So, pseudo code would be:
>>> g.createAutomaticIndex('myIndex', Vertex.class, new pair[,]
>>> {Node._Type=Agency},“Key”)
>>> 
>>> Is this the right approach, or are we doing something wrong
>> 
>> You can't do that with AutomaticIndices.
>> 
>>> The solution we want is to be able to count all the Nodes in the database 
>>> with a property _Type=Agency and property Key=”myKey” or to checking the 
>>> existence of a Node  with _Type=”Agency” and Key=”myKey”.
>> 
>> Yea. The not so efficient way to do that is:
>> 
>> g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
>> 
>> 1. get agencies
>> 2. iterate and filter out those whose key doesn't equal 'myKey'
>> 3. count up what gets emitted from the pipeline.
>> 
>> Perhaps Neo4j guys can help as there are some things with Lucene indices and 
>> the 'AND' clause. Given that AutomaticIndex, when used with Neo4jGraph, is 
>> just a wrapper to Lucene, I believe you can do stuff like '_Type AND 
>> Key=myKey' ? -- I've never done it so I don't know... Rick, on this list, 
>> knows the ins and outs of indices 
>> 
>>> 
>>> and to do a count or check if it exists would be multiple filters 
>>> g.V[[_Typey:Agency],[ Name:Acme]].count()
>> 
>> Yea, thats a bit excessive -- too many things to iterate through. You can do 
>> the previous:
>>   g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
>> 
>>> 
>> 
>> Good luck,
>> Marko.
>> 
>> http://markorodriguez.com
>> 
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user
___
Neo4j mailing lis

Re: [Neo4j] Query Number of Nodes with Property Filter

2011-06-14 Thread Tatham Oddie
... and the context of the original question was to ensure that agency keys are 
unique when creating them.


-- Tatham


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Tatham Oddie
Sent: Wednesday, 15 June 2011 3:35 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Query Number of Nodes with Property Filter

We're building a client and case management system for social work agencies.

It will be a multitenant system, hosting multiple agencies.

Agencies have a name "Acme Agency Australia" and a key "acme" that is used in 
places like URLs (http://thesystem.org/acme).

Users are scoped to agencies. Usernames need to be unique within agencies.

When a user logs in, they will complete three fields - agency key ("acme"), 
username ("tatham"), password. We need to find that user, within the scope of 
that agency to validate their login.

Another group of users are scoped to the entire system - they are the system 
wide administrators. They only operate at a system level.

We need to be *really* careful about separating each agency's data. I'm 
currently thinking along the lines that when a user logs in, and we resolve the 
agency node they belong to, we'd store a handle/reference to that agency node 
in their session/auth ticket/somewhere. We'd then architect all of our data 
access services to always commence their queries from this agency node. 
Basically promoting the agency nodes to reference nodes in the context of each 
session.

Currently we're just dealing with agencies and users as our first features, 
then will start building out client management.

(Architecturally, we're building in .NET via the REST API.)


-- Tatham


-Original Message-
From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
Behalf Of Michael Hunger
Sent: Wednesday, 15 June 2011 2:54 PM
To: Neo4j user discussions
Subject: Re: [Neo4j] Query Number of Nodes with Property Filter

just describe your domain and your use-cases for usage and the graph model you 
developed and we can discuss it.

Michael

Sent from my iBrick4


Am 15.06.2011 um 02:43 schrieb Tatham Oddie :

> Hi Michael,
> 
> (Warning: graph db n00b disclaimer still applies)
> 
> Category nodes are an interesting approach.
> 
> Would you mind validating the graph we've come up with to make sure we're on 
> the right track?
> 
> 
> -- Tatham
> 
> 
> -Original Message-
> From: user-boun...@lists.neo4j.org
> [mailto:user-boun...@lists.neo4j.org] On Behalf Of Michael Hunger
> Sent: Wednesday, 15 June 2011 1:42 AM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Query Number of Nodes with Property Filter
> 
> you can use category nodes to connect nodes of a certain type to.
> 
> then you can count the nodes using a traversal
> 
> you dont have to go via an index to do things like that
> 
> 
> Sent from my iBrick4
> 
> 
> Am 14.06.2011 um 17:10 schrieb Marko Rodriguez :
> 
>> Hi,
>> 
>>> Is it possible that when we create the Automatic Index, that we can filter 
>>> it on specific nodes?
>> 
>> No.
>> 
>>> Referring to the diagram below, we have a Node with a property _Type= 
>>> Agency. I would like to create an index (aidx-agency-key) based on Key but 
>>> only for the Nodes with _Type=Agency.
>>> So, pseudo code would be:
>>> g.createAutomaticIndex('myIndex', Vertex.class, new pair[,]
>>> {Node._Type=Agency},“Key”)
>>> 
>>> Is this the right approach, or are we doing something wrong
>> 
>> You can't do that with AutomaticIndices.
>> 
>>> The solution we want is to be able to count all the Nodes in the database 
>>> with a property _Type=Agency and property Key=”myKey” or to checking the 
>>> existence of a Node  with _Type=”Agency” and Key=”myKey”.
>> 
>> Yea. The not so efficient way to do that is:
>> 
>> g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
>> 
>> 1. get agencies
>> 2. iterate and filter out those whose key doesn't equal 'myKey'
>> 3. count up what gets emitted from the pipeline.
>> 
>> Perhaps Neo4j guys can help as there are some things with Lucene indices and 
>> the 'AND' clause. Given that AutomaticIndex, when used with Neo4jGraph, is 
>> just a wrapper to Lucene, I believe you can do stuff like '_Type AND 
>> Key=myKey' ? -- I've never done it so I don't know... Rick, on this list, 
>> knows the ins and outs of indices 
>> 
>>> 
>>> and to do a count or check if it exists would be multiple filters 
>>> g.V[[_Typey:Agency],[ Name:Acme]].count()
>> 
>> Yea, thats a bit excessive -- too many things to iterate through. You can do 
>> the previous:
>>   g.idx('myIndex').get('_Type','Agency')[[key:'myKey']].count()
>> 
>>> 
>> 
>> Good luck,
>> Marko.
>> 
>> http://markorodriguez.com
>> 
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://list

Re: [Neo4j] Cannot find a path

2011-06-14 Thread Peter Neubauer
Josh,
the docs are now at
http://docs.neo4j.org/chunked/snapshot/rest-api-graph-algos.html

Let me know if you want to see more, I am planning to put in an
example of Dijkstra, too.

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Wed, Jun 15, 2011 at 4:50 AM, Josh Adell  wrote:
> Thank you, Peter, that was exactly it.  Yeah, I didn't realize that the max
> depth defaulted to 1.  For now, I guess the library I'm writing will have to
> support "max depth" and "max_depth" since I won't always know what version
> it will be running against.
>
> Thanks again,
> Josh Adel
>
> Message: 4
>> Date: Tue, 14 Jun 2011 16:35:07 +0200
>> From: Peter Neubauer 
>> Subject: Re: [Neo4j] Cannot find a path
>> To: Neo4j user discussions 
>> Message-ID: 
>> Content-Type: text/plain; charset=ISO-8859-1
>>
>> Josh,
>>
>> you need to spcify the "max depth" parameter for the algo, which
>> defaults to 1 and thus is not gaining any results. I am pushing
>> documentation on this, and I am changing this to "max_depth", but for
>> the time being, it is something like
>>
>> "{\"to\": \"http://localhost:7474/db/data/node/"+data.get().get( "him"
>> ).getId()+"\"" +
>>                        ",\"max depth\":2}"
>>
>> Does that work?
>>
>> Cheers,
>>
>> /peter neubauer
>>
>> GTalk:? ? ? neubauer.peter
>> Skype? ? ?? peter.neubauer
>> Phone? ? ?? +46 704 106975
>> LinkedIn?? http://www.linkedin.com/in/neubauer
>> Twitter? ? ? http://twitter.com/peterneubauer
>>
>> http://www.neo4j.org? ? ? ? ? ? ?? - Your high performance graph database.
>> http://startupbootcamp.org/ ? ?- ?resund - Innovation happens HERE.
>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>>
>>
>>
>> On Tue, Jun 14, 2011 at 2:55 PM, Peter Neubauer
>>  wrote:
>> > Josh,
>> > working on it ...
>> >
>> > Cheers,
>> >
>> > /peter neubauer
>> >
>> > GTalk:? ? ? neubauer.peter
>> > Skype? ? ?? peter.neubauer
>> > Phone? ? ?? +46 704 106975
>> > LinkedIn?? http://www.linkedin.com/in/neubauer
>> > Twitter? ? ? http://twitter.com/peterneubauer
>> >
>> > http://www.neo4j.org? ? ? ? ? ? ?? - Your high performance graph
>> database.
>> > http://startupbootcamp.org/ ? ?- ?resund - Innovation happens HERE.
>> > http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>> >
>> >
>> >
>> > On Tue, Jun 14, 2011 at 2:44 PM, Josh Adell 
>> wrote:
>> >> Hello all, sorry for the re-post, but I am still stuck. ?Does anyone
>> have an
>> >> idea about what I may be doing wrong, or is there any more information I
>> can
>> >> provide to help diagnose?
>> >>
>> >> Thanks!
>> >>
>> >> -- Josh Adell
>> >>
>> >>> --
>> >>>
>> >>> Message: 6
>> >>> Date: Sun, 12 Jun 2011 14:17:17 -0400
>> >>> From: Josh Adell 
>> >>> Subject: [Neo4j] Cannot find a path
>> >>> To: user@lists.neo4j.org
>> >>> Message-ID: 
>> >>> Content-Type: text/plain; charset=ISO-8859-1
>> >>>
>> >>> Hello all,
>> >>>
>> >>> I recently began exploring Neo4j REST interface, and I am having a
>> problem
>> >>> finding paths between nodes.
>> >>> I am using neo4j-community-1.4.M03
>> >>>
>> >>> My nodes and relationships look like this (verified using the webadmin
>> >>> interface):
>> >>>
>> >>> (1: Node A) IN> (3: Node C) > >>>
>> >>> Using curl, I can query from node A to C:
>> >>> 
>> >>> $ curl -i -HAccept:application/json -HContent-Type:application/json -X
>> POST
>> >>> -d '{"to":"http://localhost:7474/db/data/node/3"}'
>> >>> http://localhost:7474/db/data/node/1/path
>> >>> HTTP/1.1 200 OK
>> >>> Content-Length: 292
>> >>> Content-Encoding: UTF-8
>> >>> Content-Type: application/json
>> >>> Access-Control-Allow-Origin: *
>> >>> Server: Jetty(6.1.25)
>> >>>
>> >>> {
>> >>> ?"start" : "http://localhost:7474/db/data/node/1";,
>> >>> ?"nodes" : [ "http://localhost:7474/db/data/node/1";, "
>> >>> http://localhost:7474/db/data/node/3"; ],
>> >>> ?"length" : 1,
>> >>> ?"relationships" : [ "http://localhost:7474/db/data/relationship/5"; ],
>> >>> ?"end" : "http://localhost:7474/db/data/node/3";
>> >>> }
>> >>> 
>> >>> I get similar results for querying for paths from B to C.
>> >>>
>> >>> But when I try to get a path from A to B (which is through C), I get an
>> >>> empty result set:
>> >>> 
>> >>> $ curl -HAccept:application/json -HContent-Type:application/json -i -X
>> POST
>> >>> -d '{"to":"http://localhost:7474/db/data/node/2"}'
>> >>> http://localhost:7474/db/data/node/1/path
>> >>> HTTP/1.1 404 Not Found
>> >>> Access-Control-Allow-Origin: *
>> >>> Content-Type: text/html; charset=i

Re: [Neo4j] How to embed neo4j to OSGI env without spring?

2011-06-14 Thread Peter Neubauer
Nicolas,
I think you could just make another branch, or rename the master
branch to something else. Then, you could set up a new master and let
it track the original master?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jun 14, 2011 at 10:12 PM, Nicolas Jouanin
 wrote:
> Hi Peter (and others),
>
> May be you can help me with github...
> I'dl like to work on this superbundle using the last version of 
> neo4j-community. The problem is that i've already forked this repo for my 
> previous work and now I can't fork it anymore. Also, i've made my 
> modifications on the master branch.
> Do you know a way of getting the last version of the source code without 
> loosing my previous work ? I was thinking of checking out back to the time 
> I've forked, then create a branch, then pull changes from the original repo.
>
> Thx.
>
> Le 14 juin 2011 à 09:03, Peter Neubauer a écrit :
>
>> Nicolas,
>> yes, after looking into the details involved, I think an "official"
>> superbundle with the core Neo4j components bundled and exported woudl
>> be the best way forward. Also, it would expose less granular bundles
>> into an OSGi environment.
>>
>> Other IndexProviders etc could be then inserted as fragments into that 
>> bundle.
>>
>> It would be absolutely fantastic if you could work on that, maybe
>> using the neo4j-osgi-examples as the demo project? We could then have
>> a packaging project there or in a "neo4j-osgi" component that does the
>> actual production of the superbundle.
>>
>> WDYT?
>>
>> Cheers,
>>
>> /peter neubauer
>>
>> GTalk:      neubauer.peter
>> Skype       peter.neubauer
>> Phone       +46 704 106975
>> LinkedIn   http://www.linkedin.com/in/neubauer
>> Twitter      http://twitter.com/peterneubauer
>>
>> http://www.neo4j.org               - Your high performance graph database.
>> http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
>> http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.
>>
>>
>>
>> On Mon, Jun 13, 2011 at 11:10 AM, Nicolas Jouanin
>>  wrote:
>>> Hi Peter,
>>>
>>> As shown below, exporting the implementation package is enough to make the 
>>> IndexProvider registered as OSGi service (see first line of dump). Now an 
>>> exception comes later when registering the index. I guess this come from 
>>> the fact that you register a service of class IndexProvider whereas 
>>> db.index().forNodes() returns an instance of Index.
>>>
>>> [Framework Event Dispatcher] INFO 
>>> org.neo4j.kernel.impl.osgi.OSGiExtensionLoader - Bundle 
>>> org.neo4j.lucene-index: Service org.neo4j.graphdb.index.IndexProvider 
>>> registered with implementation org.neo4j.graphdb.index.IndexProvider[lucene]
>>> Kernel: attempting to load extensions of type 
>>> org.neo4j.kernel.KernelExtension
>>> Kernel: attempting to load extensions of type 
>>> org.neo4j.graphdb.index.IndexProvider
>>> Kernel: attempting to load extensions of type org.neo4j.kernel.Version
>>> [Start Level Event Dispatcher] DEBUG 
>>> BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent 
>>> REGISTERED
>>> [Start Level Event Dispatcher] DEBUG 
>>> BuildByTinyBundlestinybundles904955895969775UID - ServiceEvent 
>>> UNREGISTERING
>>> [Framework Event Dispatcher] DEBUG 
>>> BuildByTinyBundlestinybundles904955895969775UID - BundleEvent STOPPED
>>> [Framework Event Dispatcher] DEBUG 
>>> BuildByTinyBundlestinybundles904955895969775UID - FrameworkEvent ERROR
>>> org.osgi.framework.BundleException: Exception in 
>>> org.neo4j.examples.osgi.Neo4jActivator.start() of bundle 
>>> BuildByTinyBundlestinybundles904955895969775UID.
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:806)
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
>>>        at 
>>> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.

Re: [Neo4j] Extent of Indexing

2011-06-14 Thread Peter Neubauer
Aman,
I think to start with, you probably want to set up indexing on only
the interesting aspects of your CMS and documents, not everything.
Normally, that leads to a much slimmer storage, and better speed in
mutating operations.

Given 50K users, the question is how much index-relevant content there
will be, and what the peak load of that system is. Do you have any
estimations for that?

Cheers,

/peter neubauer

GTalk:      neubauer.peter
Skype       peter.neubauer
Phone       +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      http://twitter.com/peterneubauer

http://www.neo4j.org               - Your high performance graph database.
http://startupbootcamp.org/    - Öresund - Innovation happens HERE.
http://www.thoughtmade.com - Scandinavia's coolest Bring-a-Thing party.



On Tue, Jun 14, 2011 at 7:24 PM, Aman  wrote:
> I've been working on a project (a CMS) that would require a lot of indexing
> as it would manage user generated content (mostly strings). Could I get some
> suggestions on what is the extent of indexing that can be useful in a
> typical CMS which could have a fair use by about 5 people? And how does
> this indexing matter if I have to scale it any further?
>
> Also, as I said above, the index would mostly deal with strings. Would it be
> any better if I put up another layer in front of my neo4j db that maps those
> strings to ints so that I could index those easily in neo4j?
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] Query Number of Nodes with Property Filter

2011-06-14 Thread Michael Hunger
Tatham,

you domain model sounds good. So you should do both things.

First try to use connected graphs for the agencies and try to traverse from the 
agency node.
If you need to do index lookups you should always use queries that add the 
agency key (which is in the session) to the lucene query (using an "and" query).

For creating unique agencies you can also use a category node for the agencies 
(probably the root node) and check with a traversal that it doesn't contain the 
agency you want to create.
Or you use an "agencies" index that is used to check for duplicates.

What other dynamic language experience is on your team (besides c#) ? We're 
working on script-server extensions that could handle some of your domain logic 
on the server side 
and talk a domain level REST protocol to your .net client app.

In general you would use indexes when you're executing context free global 
queries on the graph and traversals if you work on dependencies from the 
context of a start-node.

Can you give some figures ? #of agencies, avg # of users per agency, avg  #of 
cases per agency?

One problem is that currently when you use the pure REST API it doesn't enforce 
your multi-tenancy concerns. So you have to encapsulate that in your 
application logic.

 There were talks about multi-database server variants and also some 
experiments with that, but it doesn't have that high a priority. This would 
solve your problem easily from a modelling perspective
(i.e. have different contexts for the agencies). But a simpilistic approach 
would impact server performance as it would just run several embedded neo4j 
instances alongside each other without resource sharing/optimization.

HTH

Cheers

Michael

Am 15.06.2011 um 07:42 schrieb Tatham Oddie:

> ... and the context of the original question was to ensure that agency keys 
> are unique when creating them.
> 
> 
> -- Tatham
> 
> 
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
> Behalf Of Tatham Oddie
> Sent: Wednesday, 15 June 2011 3:35 PM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Query Number of Nodes with Property Filter
> 
> We're building a client and case management system for social work agencies.
> 
> It will be a multitenant system, hosting multiple agencies.
> 
> Agencies have a name "Acme Agency Australia" and a key "acme" that is used in 
> places like URLs (http://thesystem.org/acme).
> 
> Users are scoped to agencies. Usernames need to be unique within agencies.
> 
> When a user logs in, they will complete three fields - agency key ("acme"), 
> username ("tatham"), password. We need to find that user, within the scope of 
> that agency to validate their login.
> 
> Another group of users are scoped to the entire system - they are the system 
> wide administrators. They only operate at a system level.
> 
> We need to be *really* careful about separating each agency's data. I'm 
> currently thinking along the lines that when a user logs in, and we resolve 
> the agency node they belong to, we'd store a handle/reference to that agency 
> node in their session/auth ticket/somewhere. We'd then architect all of our 
> data access services to always commence their queries from this agency node. 
> Basically promoting the agency nodes to reference nodes in the context of 
> each session.
> 
> Currently we're just dealing with agencies and users as our first features, 
> then will start building out client management.
> 
> (Architecturally, we're building in .NET via the REST API.)
> 
> 
> -- Tatham
> 
> 
> -Original Message-
> From: user-boun...@lists.neo4j.org [mailto:user-boun...@lists.neo4j.org] On 
> Behalf Of Michael Hunger
> Sent: Wednesday, 15 June 2011 2:54 PM
> To: Neo4j user discussions
> Subject: Re: [Neo4j] Query Number of Nodes with Property Filter
> 
> just describe your domain and your use-cases for usage and the graph model 
> you developed and we can discuss it.
> 
> Michael
> 
> Sent from my iBrick4
> 
> 
> Am 15.06.2011 um 02:43 schrieb Tatham Oddie :
> 
>> Hi Michael,
>> 
>> (Warning: graph db n00b disclaimer still applies)
>> 
>> Category nodes are an interesting approach.
>> 
>> Would you mind validating the graph we've come up with to make sure we're on 
>> the right track?
>> 
>> 
>> -- Tatham
>> 
>> 
>> -Original Message-
>> From: user-boun...@lists.neo4j.org
>> [mailto:user-boun...@lists.neo4j.org] On Behalf Of Michael Hunger
>> Sent: Wednesday, 15 June 2011 1:42 AM
>> To: Neo4j user discussions
>> Subject: Re: [Neo4j] Query Number of Nodes with Property Filter
>> 
>> you can use category nodes to connect nodes of a certain type to.
>> 
>> then you can count the nodes using a traversal
>> 
>> you dont have to go via an index to do things like that
>> 
>> 
>> Sent from my iBrick4
>> 
>> 
>> Am 14.06.2011 um 17:10 schrieb Marko Rodriguez :
>> 
>>> Hi,
>>> 
 Is it possible that when we create the Automatic Index, that we can filter 
 it on specific n

Re: [Neo4j] Which version of neo4j does spring data graph project use ?

2011-06-14 Thread Michael Hunger
Sorry, mixed up the threads on the iphone :(

Will post an SDG update right ahead.

Michael
Am 15.06.2011 um 05:42 schrieb Vipul Gupta:

> Michael,
> 
> I don't see anything released on maven repo yet?
> Please update.
> 
> -VIpul
> 
> On Fri, Jun 10, 2011 at 3:40 PM, Michael Hunger
>  wrote:
>> Wait for our spring data graph 1.1.0.M1 release on Monday :)
>> 
>> it will be updated to Neo4j 1.4.M04
>> 
>> Cheers
>> 
>> Michael
>> 
>> Am 10.06.2011 um 11:55 schrieb Vipul Gupta:
>> 
>>> Please let me know..
>>> I want to use the latest version of neo4j say " Neo4j 1.4 M03 “Kiruna
>>> " with spring data graph. WHat do I do ?
>>> ___
>>> Neo4j mailing list
>>> User@lists.neo4j.org
>>> https://lists.neo4j.org/mailman/listinfo/user
>> 
>> ___
>> Neo4j mailing list
>> User@lists.neo4j.org
>> https://lists.neo4j.org/mailman/listinfo/user
>> 
> ___
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user

___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user