Re: [Neo4j] IndexProvider question

2010-09-10 Thread Honnur Vorvoi
I would like to set AND as the default operator when I create index using the 
new index library:
Index = indexProvider.nodeIndex( fulltext, 
LuceneIndexProvider.FULLTEXT_CONFIG );
 
I didn't find setDefaultOperator (similar to the one 
in LuceneFulltextQueryIndexService )in any of the provider classes. 
Is it supported in the new index provider? if not, is there a way we can set 
the same?
 
Thanks in advance.
 

--- On Thu, 9/9/10, Honnur Vorvoi vhon...@yahoo.com wrote:


From: Honnur Vorvoi vhon...@yahoo.com
Subject: Re: [Neo4j] IndexProvider question
To: user@lists.neo4j.org
Date: Thursday, September 9, 2010, 10:33 PM







Thanks Mattias.
Since IndexProvider does all LuceneFulltextQueryIndexService can do and much 
more, I am going to use just IndexProvider.
 
 
Date: Wed, 8 Sep 2010 16:28:56 +0200
From: Mattias Persson matt...@neotechnology.com
Subject: Re: [Neo4j] IndexProvider question
To: Neo4j user discussions user@lists.neo4j.org
Message-ID:
    aanlktin4cjw=smw00=1nlkt8ftmys6xtnvtrve_j9...@mail.gmail.com
Content-Type: text/plain; charset=UTF-8

Hi Honnur!

2010/9/6, Honnur Vorvoi vhon...@yahoo.com:
 Hello,

 I have the following questions with regard to the IndexProvider(example
 below):

 1. I already have LuceneFulltextQueryIndexService. Can I use IndexProvider
 with the same graphDb as well? or are they mutually exclusive?

They are separate from one another so both can be used alongside of
each other. Something stored in one of either
LuceneIndexService/LuceneIndexProvider won't affect the other.

 2. What doesn the param users in provider.nodeIndex(users) represent?

The LuceneIndexService can only keep values from one key in each
index, but the new LuceneIndexProvider can spawn indexes which can
contain any number of keys and values (making compound queries
possible). Since an index isn't tied to a property key you must name
each index yourself. Each index can also be configured to be either
fulltext or not, to use lower case conversion or not, a.s.o.

 3. Do I need to add all the properties in IndexNode(line# 45) in order to
 query? (I have already index the same properties with
 LuceneFulltextQueryIndexService)

see my answer for (1), in short: LuceneIndexProvider and the indexes
it spawns has nothing to do with LuceneIndexService (or any derivative
thereof) and hence can't share state.

 4. Is it easy to include the query(String) method in
 LuceneFulltextQueryIndexService, so I can use just one indexservice
 otherwise I would be using LuceneIndexProvider just for query(String)
 method.

To add compound querying the storage format (i.e. Lucene usage) needed
to change in incompatible ways, so it isn't an easy fix to add that.
It could however be done by querying multiple indexes in parallell and
merge the results afterwards, but I don't think performance would be
anywhere near using Lucene the right way for compound queries, as
LuceneIndexProvider does.


 As alwasy, appreciate your suggestions/recommendations


 1     IndexProvider provider = new LuceneIndexProvider( graphDb );
 2     IndexNode myIndex = provider.nodeIndex( users );
 3
 4     myIndex.add( myNode, type, value1 );
 5     myIndex.add( myNode, key1, value2 );
 6
 7     // Ask lucene queries directly here
 8     for ( Node searchHit : myIndex.query( type:value1 AND key1:value2 )
 )
 9     {
 10         System.out.println( Found  + searchHit );
 11     }
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] IndexProvider question

2010-09-10 Thread Mattias Persson
2010/9/10, Honnur Vorvoi vhon...@yahoo.com:
 I would like to set AND as the default operator when I create index using
 the new index library:
 Index = indexProvider.nodeIndex( fulltext,
 LuceneIndexProvider.FULLTEXT_CONFIG );

 I didn't find setDefaultOperator (similar to the one
 in LuceneFulltextQueryIndexService )in any of the provider classes.
 Is it supported in the new index provider? if not, is there a way we can set
 the same?

 Thanks in advance.

That functionality is easy to add, I just haven't gotten around to do
it. I'll try to add that as soon as possible. Excellent feedback on
the new IndexProvider framework, keep it coming!



 --- On Thu, 9/9/10, Honnur Vorvoi vhon...@yahoo.com wrote:


 From: Honnur Vorvoi vhon...@yahoo.com
 Subject: Re: [Neo4j] IndexProvider question
 To: user@lists.neo4j.org
 Date: Thursday, September 9, 2010, 10:33 PM







 Thanks Mattias.
 Since IndexProvider does all LuceneFulltextQueryIndexService can do and much
 more, I am going to use just IndexProvider.


 Date: Wed, 8 Sep 2010 16:28:56 +0200
 From: Mattias Persson matt...@neotechnology.com
 Subject: Re: [Neo4j] IndexProvider question
 To: Neo4j user discussions user@lists.neo4j.org
 Message-ID:
 aanlktin4cjw=smw00=1nlkt8ftmys6xtnvtrve_j9...@mail.gmail.com
 Content-Type: text/plain; charset=UTF-8

 Hi Honnur!

 2010/9/6, Honnur Vorvoi vhon...@yahoo.com:
 Hello,

 I have the following questions with regard to the IndexProvider(example
 below):

 1. I already have LuceneFulltextQueryIndexService. Can I use IndexProvider
 with the same graphDb as well? or are they mutually exclusive?

 They are separate from one another so both can be used alongside of
 each other. Something stored in one of either
 LuceneIndexService/LuceneIndexProvider won't affect the other.

 2. What doesn the param users in provider.nodeIndex(users) represent?

 The LuceneIndexService can only keep values from one key in each
 index, but the new LuceneIndexProvider can spawn indexes which can
 contain any number of keys and values (making compound queries
 possible). Since an index isn't tied to a property key you must name
 each index yourself. Each index can also be configured to be either
 fulltext or not, to use lower case conversion or not, a.s.o.

 3. Do I need to add all the properties in IndexNode(line# 45) in order
 to
 query? (I have already index the same properties with
 LuceneFulltextQueryIndexService)

 see my answer for (1), in short: LuceneIndexProvider and the indexes
 it spawns has nothing to do with LuceneIndexService (or any derivative
 thereof) and hence can't share state.

 4. Is it easy to include the query(String) method in
 LuceneFulltextQueryIndexService, so I can use just one indexservice
 otherwise I would be using LuceneIndexProvider just for query(String)
 method.

 To add compound querying the storage format (i.e. Lucene usage) needed
 to change in incompatible ways, so it isn't an easy fix to add that.
 It could however be done by querying multiple indexes in parallell and
 merge the results afterwards, but I don't think performance would be
 anywhere near using Lucene the right way for compound queries, as
 LuceneIndexProvider does.


 As alwasy, appreciate your suggestions/recommendations


 1 IndexProvider provider = new LuceneIndexProvider( graphDb );
 2 IndexNode myIndex = provider.nodeIndex( users );
 3
 4 myIndex.add( myNode, type, value1 );
 5 myIndex.add( myNode, key1, value2 );
 6
 7 // Ask lucene queries directly here
 8 for ( Node searchHit : myIndex.query( type:value1 AND key1:value2
 )
 )
 9 {
 10 System.out.println( Found  + searchHit );
 11 }
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user



 --
 Mattias Persson, [matt...@neotechnology.com]
 Hacker, Neo Technology
 www.neotechnology.com
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] erlang-neo4j

2010-09-10 Thread Dmitrii Dimandt
I got cali's benchmark result. Well, sort of benchmarks: 
http://github.com/dmitriid/cali/wiki/Benchmarks-of-sorts There's neo4j, 
TinkerGraph and OrientDB

For some odd reason neo4j performs abysmally, though yesterday it was way, way 
better: http://twitter.com/dmitriid/status/23912123904

Will have to investigate further.


 Hey,
 
 Yeah, it'll be my next step, I guess :) Blueprints make this stuff 
 super-easy :)
 
 Yea---write to the Blueprints interfaces and then you can plug and play your 
 graph backends.
 
 I also see plain simple FS in there as well ;)
 
 Ha. Yea---I started that, but never went far with it. In short, it makes your 
 file system look like a property graph (e.g. subdirectory, contains, etc.). 
 When Gremlin moves into more advanced I/O support, I think I'll revisit 
 FileGraph as that might be a good way for Gremlin to interface with the 
 operating system's file system.
 
 BTW, I've also noticed there's mongodb support for storage (?) How would you 
 use that?
 
 Yea. So, long long ago, Peter and I wanted to make a single interface for all 
 NoSQL systems. The JSON databases of CouchDB and MongoDB were the next up 
 after property graphs... Currently, in Blueprints, there is support for 
 MongoDB and TinkerDoc as JSON databases, but its not fully tested, not fully 
 thought out, etc. etc... Hopefully in the near future, we can get some steam 
 to flesh all that out better.
 
 Good luck with Cali,
 Marko.
 
 http://markorodriguez.com
 http://tinkerpop.com

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


Re: [Neo4j] erlang-neo4j

2010-09-10 Thread Dmitrii Dimandt

Yeah, I guess that could be a problem (or the problem).

Hmmm... I'll try and run the benchmark on a less busier machine and see what 
happens then.

Thanks for the tip!

 FWIW, I've noticed that neo4j seems to be fairly sensitive to disk I/O
 performance.
 
 I couldn't get it to work at all on an NFS mountpoint.
 
 It works much better on a Solaris tmpfs partition instead.
 
 
 
 I got cali's benchmark result. Well, sort of benchmarks:
 http://github.com/dmitriid/cali/wiki/Benchmarks-of-sorts There's neo4j,
 TinkerGraph and OrientDB
 
 For some odd reason neo4j performs abysmally, though yesterday it was way,
 way better: http://twitter.com/dmitriid/status/23912123904
 
 Will have to investigate further.
 
 
 Hey,
 
 Yeah, it'll be my next step, I guess :) Blueprints make this stuff
 super-easy :)
 
 Yea---write to the Blueprints interfaces and then you can plug and play
 your graph backends.
 
 I also see plain simple FS in there as well ;)
 
 Ha. Yea---I started that, but never went far with it. In short, it makes
 your file system look like a property graph (e.g. subdirectory,
 contains, etc.). When Gremlin moves into more advanced I/O support, I
 think I'll revisit FileGraph as that might be a good way for Gremlin to
 interface with the operating system's file system.
 
 BTW, I've also noticed there's mongodb support for storage (?) How
 would you use that?
 
 Yea. So, long long ago, Peter and I wanted to make a single interface
 for all NoSQL systems. The JSON databases of CouchDB and MongoDB were
 the next up after property graphs... Currently, in Blueprints, there is
 support for MongoDB and TinkerDoc as JSON databases, but its not fully
 tested, not fully thought out, etc. etc... Hopefully in the near future,
 we can get some steam to flesh all that out better.
 
 Good luck with Cali,
 Marko.
 
 http://markorodriguez.com
 http://tinkerpop.com
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 
 -- 
 Rick Otten
 rot...@windfish.net
 O=='=+
 
 

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


Re: [Neo4j] erlang-neo4j

2010-09-10 Thread Marko Rodriguez
Hi Dimitri,

Also, Blueprints assumes auto transactions (that is, every delete/write is a 
committed transaction). You can turn that feature off if you want better 
write/delete performance.

One of my next big goals with Blueprints is a general-purpose transaction model 
so that all transaction-based graphs have the same interface through 
Blueprints. No graph instanceof NeoGraph needed.

Hope that helps,
Marko.

http://markorodriguez.com
http://tinkerpop.com

On Sep 10, 2010, at 4:28 PM, Dmitrii Dimandt wrote:

 
 Yeah, I guess that could be a problem (or the problem).
 
 Hmmm... I'll try and run the benchmark on a less busier machine and see 
 what happens then.
 
 Thanks for the tip!
 
 FWIW, I've noticed that neo4j seems to be fairly sensitive to disk I/O
 performance.
 
 I couldn't get it to work at all on an NFS mountpoint.
 
 It works much better on a Solaris tmpfs partition instead.
 
 
 
 I got cali's benchmark result. Well, sort of benchmarks:
 http://github.com/dmitriid/cali/wiki/Benchmarks-of-sorts There's neo4j,
 TinkerGraph and OrientDB
 
 For some odd reason neo4j performs abysmally, though yesterday it was way,
 way better: http://twitter.com/dmitriid/status/23912123904
 
 Will have to investigate further.
 
 
 Hey,
 
 Yeah, it'll be my next step, I guess :) Blueprints make this stuff
 super-easy :)
 
 Yea---write to the Blueprints interfaces and then you can plug and play
 your graph backends.
 
 I also see plain simple FS in there as well ;)
 
 Ha. Yea---I started that, but never went far with it. In short, it makes
 your file system look like a property graph (e.g. subdirectory,
 contains, etc.). When Gremlin moves into more advanced I/O support, I
 think I'll revisit FileGraph as that might be a good way for Gremlin to
 interface with the operating system's file system.
 
 BTW, I've also noticed there's mongodb support for storage (?) How
 would you use that?
 
 Yea. So, long long ago, Peter and I wanted to make a single interface
 for all NoSQL systems. The JSON databases of CouchDB and MongoDB were
 the next up after property graphs... Currently, in Blueprints, there is
 support for MongoDB and TinkerDoc as JSON databases, but its not fully
 tested, not fully thought out, etc. etc... Hopefully in the near future,
 we can get some steam to flesh all that out better.
 
 Good luck with Cali,
 Marko.
 
 http://markorodriguez.com
 http://tinkerpop.com
 
 ___
 Neo4j mailing list
 User@lists.neo4j.org
 https://lists.neo4j.org/mailman/listinfo/user
 
 
 
 -- 
 Rick Otten
 rot...@windfish.net
 O=='=+
 
 
 

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


[Neo4j] Relationship Check During Traversal

2010-09-10 Thread Paddy
Hi just a quick question regarding the use of the PruneEvaluator

I was wondering what would be the best way to modify the
TraversalDescription in the Dijkstra
algorithm in order to prune a traversal when a branch has reached a second
transfer relationship.
I want to avoid multiple transfers in a bus network.

If the graph is arranged as:

(stop:1) --bus (stop:2) --transfer (stop:3) --bus (stop:4) --transfer 
(stop:5)

Is it possible to prune the traversal branch when the 2nd transfer
relationship is reached after (stop:4)
Could this be achieved using a PruneEvaluator? Or am I approaching this the
wrong way?

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


Re: [Neo4j] Relationship Check During Traversal

2010-09-10 Thread David Montag
Hi Paddy,

One idea is to prune the traversal by looking at whether the path so far
already has a transfer relationship or not. You would then do some kind of
filtering of the resulting paths, e.g. only accepting those with correct end
nodes. I don't know if the computational complexity of this is acceptable or
not though.

And I don't know if this answer was relevant or not. I hope it was :)

David

On Sat, Sep 11, 2010 at 4:09 AM, Paddy paddyf...@gmail.com wrote:

 Hi just a quick question regarding the use of the PruneEvaluator

 I was wondering what would be the best way to modify the
 TraversalDescription in the Dijkstra
 algorithm in order to prune a traversal when a branch has reached a second
 transfer relationship.
 I want to avoid multiple transfers in a bus network.

 If the graph is arranged as:

 (stop:1) --bus (stop:2) --transfer (stop:3) --bus (stop:4) --transfer 
 (stop:5)

 Is it possible to prune the traversal branch when the 2nd transfer
 relationship is reached after (stop:4)
 Could this be achieved using a PruneEvaluator? Or am I approaching this the
 wrong way?

 thanks
 Paddy
 ___
 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