Re: [Neo4j] neo4j REST server standalone

2010-07-02 Thread Jacob Hansson
Hi Mohit,

the admin system is meant to eventually be able to provide support for live
backups, although there is quite a bit of work left on other components
first.

The admin interface currently depends on the REST package which, afaik, does
not turn on the command-line shell by default. There will be an integrated
gremlin web console though. It would probably not be that difficult to add a
setting for enabling/disabling command-line shell access though. I added
this as a ticket to the github project -
http://github.com/neo4j/webadmin/issues/issue/8.

/Jacob

On Thu, Jul 1, 2010 at 11:34 PM, Mohit Vazirani mohi...@yahoo.com wrote:





 - Original Message 
 From: Mattias Persson matt...@neotechnology.com
 To: Neo4j user discussions user@lists.neo4j.org
 Sent: Thu, July 1, 2010 6:53:48 AM
 Subject: Re: [Neo4j] neo4j REST server standalone

 Hi, I'm guessing you would like to specify a configuration file for
 the database, right?

 Yes.

 That can't be done at the moment, but work is put into creating an
 admin interface to neo4j, initially quite tied to the rest API. I can
 see if I can whip something up which makes this possible as it is
 right now.

 That will be pretty useful. Also, will the admin interface allow me to
 connect
 through the shell in R/W mode while the REST server is running?

 By the way, memory mapping settings are auto-configured if no specific
 config is given for that. It looks at how much heap you've given it
 and how big your graph store files are (this is done at startup time,
 so if the store changes a lot then a restart would be required to have
 it optimally configured for the new store size).

 Interesting. Also, I'm trying to perform online backups with this rest
 server.
 Are logical logs enabled by default when using the REST server? I cannot
 find
 any files matching the pattern *log.v*, all I see is the file
 nioneo_logical.log.1And if so, is there a way to perform online backups
 while
 the REST server is running?

 2010/6/30 Mohit Vazirani mohi...@yahoo.com

  Hi,
 
  I'm a beginner to neo4j. Recently set up the standalone rest server in
  linux
  (started using neo4j-rest start). I was reviewing
  http://wiki.neo4j.org/content/Configuration_Settings and was wondering
 how
  to
  specify memory-mapped I/O settings  other backup-related settings to the
  REST
  server. I couldn't find any section in wrapper.conf that allowed me to do
  this.
 
  Thanks,
  ~Mohit
 
 
 
 
  ___
  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




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




-- 
Jacob Hansson
Phone: +46 (0) 763503395
Twitter: @jakewins
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


Re: [Neo4j] neo4j REST server standalone

2010-07-02 Thread Mattias Persson
2010/7/1 Mohit Vazirani mohi...@yahoo.com





 - Original Message 
 From: Mattias Persson matt...@neotechnology.com
 To: Neo4j user discussions user@lists.neo4j.org
 Sent: Thu, July 1, 2010 6:53:48 AM
 Subject: Re: [Neo4j] neo4j REST server standalone

 Hi, I'm guessing you would like to specify a configuration file for
 the database, right?

 Yes.

 That can't be done at the moment, but work is put into creating an
 admin interface to neo4j, initially quite tied to the rest API. I can
 see if I can whip something up which makes this possible as it is
 right now.

 That will be pretty useful. Also, will the admin interface allow me to
 connect
 through the shell in R/W mode while the REST server is running?

 By the way, memory mapping settings are auto-configured if no specific
 config is given for that. It looks at how much heap you've given it
 and how big your graph store files are (this is done at startup time,
 so if the store changes a lot then a restart would be required to have
 it optimally configured for the new store size).

 Interesting. Also, I'm trying to perform online backups with this rest
 server.
 Are logical logs enabled by default when using the REST server? I cannot
 find
 any files matching the pattern *log.v*, all I see is the file
 nioneo_logical.log.1And if so, is there a way to perform online backups
 while
 the REST server is running?


I've done some modifications and the REST server now looks in the database
directory for a neo4j.properties file and uses it for configuration if it
exists. There you can set keep_logical_logs=true to make neo4j keep its
logical (.v??) logs for online backup. However, to perform online backup
there should probably be a configuration parameter in wrapper.conf which
enables that I'd guess. Are you planning to do online backup to another
running database or to another disk?

The shell is now also startable via a configuration parameter, so if you
supply a enable_remote_shell=true parameter in that neo4j.properties file
it will be started.

Of course, you'd have to download the latest REST standalone server for all
this to be working.

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


[Neo4j] Online backup via shell

2010-07-02 Thread Mattias Persson
I'm thinking about adding a backup command to the shell which (if the
server has online-backup on the classpath) can perform an online-backup to a
destination of choice (given that the source db has been copied a first time
already to that location). Btw. it'd be nice to get rid of that step
somehow.

And maybe add a -c argument to the shell main class so that you can do:

  $ java -jar neo4j-shell-version.jar -c backup /my/backup/db

so that you could put it as a cron job or something. That command could also
be able to set data sources to keep their logical logs or other stuff. Just
a thought... would that be useful?

-- 
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] LuceneFulltextIndexService searching example

2010-07-02 Thread Paddy
sorry should of seen that, thanks for your help
Paddy

On Wed, Jun 30, 2010 at 4:27 AM, Mattias Persson
matt...@neotechnology.comwrote:

 As the example states you must use the LuceneFulltextQueryIndexService (not
 the LuceneFulltextIndexService)!

 2010/6/30 Paddy paddyf...@gmail.com

  I have been trying out the example at:
  http://wiki.neo4j.org/content/Indexing_with_IndexService
  I'm trying to implement LuceneFulltextIndexService searching
 
  I made this test app, just copying and pasting from the example.
  The results I'm getting are different from the results expected from the
  wiki example.
  What am i doing wrong? I'm using the latest 1.1 snapshot.
 
  OUTPUT:
  1: nodes size 0
  2: nodes size 1
  3: nodes size 1
  4: nodes size 2
  5: nodes size 0
  6: nodes size 0
  7: nodes size 0
  8: nodes size 0
 
 
  package test;
 
  import org.neo4j.graphdb.GraphDatabaseService;
  import org.neo4j.graphdb.Node;
  import org.neo4j.graphdb.Transaction;
  import org.neo4j.index.IndexHits;
  import org.neo4j.index.IndexService;
  import org.neo4j.index.lucene.LuceneFulltextIndexService;
 
  import org.neo4j.kernel.EmbeddedGraphDatabase;
 
  public class LuceneTest {
 
 
 private static GraphDatabaseService graphDb;
 private static IndexService index;
 
 public static void main( final String[] args ){
 graphDb = new EmbeddedGraphDatabase(target/neo4j-db-lucene6);
 index= new LuceneFulltextIndexService(graphDb);
 
 Transaction tx = graphDb.beginTx();
 try
 {
 
 Node andy = graphDb.createNode();
 Node larry = graphDb.createNode();
 
 andy.setProperty( name, Andy Wachowski );
 andy.setProperty( title, Director );
 larry.setProperty( name, Larry Wachowski );
 larry.setProperty( title, Director );
 index.index( andy, name, andy.getProperty( name ) );
 index.index( andy, title, andy.getProperty( title ) );
 index.index( larry, name, larry.getProperty( name ) );
 index.index( larry, title, larry.getProperty( title ) );
 
 
 
 
 IndexHitsNode  nodes = index.getNodes( name, wachow*
 andy
  ); // -- andy and larry
 System.out.println(1: nodes size  + nodes.size());
 nodes = index.getNodes( name, Andy ); // -- andy
 System.out.println(2: nodes size  + nodes.size());
 nodes = index.getNodes( name, andy ); // -- andy
 System.out.println(3: nodes size  + nodes.size());
 nodes = index.getNodes( name, wachowski ); // -- andy and
  larry
 System.out.println(4: nodes size  + nodes.size());
 nodes = index.getNodes( name, +wachow* +larry ); // --
  larry
 System.out.println(5: nodes size  + nodes.size());
 nodes = index.getNodes( name, andy AND larry ); // --
 System.out.println(6: nodes size  + nodes.size());
 nodes = index.getNodes( name, andy OR larry ); // -- andy
  and larry
 System.out.println(7: nodes size  + nodes.size());
 nodes = index.getNodes( name, Wachowski AND larry ); //
 --
  larry
 System.out.println(8: nodes size  + nodes.size());
 
 tx.success();
 
 }
 finally
 {
 tx.finish();
 graphDb.shutdown();
 
 }
 }
 
  }
  ___
  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

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


[Neo4j] Identifying similar nodes in a 2-mode network

2010-07-02 Thread Paul A. Jackson
Hi All,

I am wondering if there is an algorithm that can identify nodes that are 
similar based upon there relationships to other nodes of a different type.  For 
example, if I have a graph of people and items purchased, I would like to be 
able to identify people with similar buying habits.  I think this is different 
from cliques in that the similar nodes may not know each other.  A popular 
application would be how Netflix can retrieve a list of users with similar 
tastes to your own, based upon your movie ratings (a different type of node), 
as opposed to how Facebook suggest friends base upon mutual friends (similar 
types of nodes).

I suppose there are at least two main approaches to the solution; one where no 
preprocessing to the data is performed but instead a query returns the most 
similar node by traversing the graph starting from the input node; and another 
where somehow an algorithm maps these nodes into some (2-dimensional?) space 
similar to how layout algorithms work, and then the query would for similar 
nodes would be a spatial query where the distance to the input node equates to 
degree of similarity.

If seems to me like this concept would be prevalent in document management.

Am I on the right track?  Are there algorithms or other research for this out 
there?  Any suggestions on how to structure a graph to support this type of 
query?

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


Re: [Neo4j] Identifying similar nodes in a 2-mode network

2010-07-02 Thread Marko Rodriguez
Hello,

 I am wondering if there is an algorithm that can identify nodes that are 
 similar based upon there relationships to other nodes of a different type.  
 For example, if I have a graph of people and items purchased, I would like to 
 be able to identify people with similar buying habits.  I think this is 
 different from cliques in that the similar nodes may not know each other.  A 
 popular application would be how Netflix can retrieve a list of users with 
 similar tastes to your own, based upon your movie ratings (a different type 
 of node), as opposed to how Facebook suggest friends base upon mutual friends 
 (similar types of nodes).

The method I use for similarity determination is as follows. 

To rank a vertex relative to all other vertices with respect to a bundle 
(i.e. shared resources), simply execute an algorithm of the form:

./ou...@label=x]/inV/i...@label=x]/outV[g:except($_)]

This will rank all vertices relative to . (the root) given the label X (e.g. 
friend, purchased, likes, visited, etc.).

Modifications to this theme include:

1. X is a set of labels
2. inV is filtered by predicate (e.g. similarity based on the notion of liking 
the movie Predator)
3. Use any number of sampling methods if the edges are weighted (i.e. to 
account for rating systems)

I say more on these ideas on slides 70-72 in this presentation
http://www.slideshare.net/slidarko/graph-windycitydb2010

Take care,
Marko.

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


Re: [Neo4j] Online backup via shell

2010-07-02 Thread Javier de la Rosa
On 2 July 2010 15:45, Mattias Persson matt...@neotechnology.com wrote:

 Just
 a thought... would that be useful?


I bet it can be useful! Especially if you add a command to restore ;-)



-- 
Javier de la Rosa
http://versae.es
___
Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user