how to index node properties between embedded java and ruby rails using HA cluster

Showing 1-4 of 4 messages
how to index node properties between embedded java and ruby rails using HA cluster Joao Martins 5/17/12 3:25 AM
Hi,

Wondering if it is possible in a HA cluster to index node properties
between a java embedded instance and a rails instance.

Example:

Insert node and a index in java:

Node node = graphDB.createNode();
node.setProperty("_classname", "ClassName");
node.setProperty("foo", "bar");
nodeIndex.add(node, "foo", "bar");

and now, i need to find it in rails, declaring a Lucene index like
this:

class ClassName < Neo4j::Rails::Model
  property :foo, :type => String
  index :foo
end

Now i need to find a instance of class ClassName with (indexed)
property "foo" as "bar":
ht = Host.find('foo: bar')
..but this isn't working, however i can find all instances of class
ClassName with
hosts = Host.all (without indexing)

How can i index properties between java and ruby? Any tip?

Thanks
João
Re: [Neo4j] how to index node properties between embedded java and ruby rails using HA cluster Michael Hunger 5/17/12 3:45 AM
Should be no problem just make sure both use the same index and keynames and value types

Sent from mobile device

Am 17.05.2012 um 12:25 schrieb Joao Martins <joao.rib...@gmail.com>:
Re: how to index node properties between embedded java and ruby rails using HA cluster Joao Martins 5/17/12 5:18 AM
Hi michael, thanks for answering

I think the problem is the indexname as the following:

graphDB.index().forNodes("nodes");

how can i know the indexName parameter of "forNodes" used by rails
active model? or how can i use my indexName "nodes" at rails?

Thanks,
Joao

On 17 Maio, 11:45, Michael Hunger <michael.hun...@neopersistence.com>
wrote:
> Should be no problem just make sure both use the same index and keynames and value types
>
> Sent from mobile device
>
> Am 17.05.2012 um 12:25 schrieb Joao Martins <joao.rib.mart...@gmail.com>:
Re: [Neo4j] Re: how to index node properties between embedded java and ruby rails using HA cluster Michael Hunger 5/17/12 5:23 AM
That's rather a question for the neo4jrb google group or Andreas (cc'ed).

Cheers

Michael

Am 17.05.2012 um 14:18 schrieb Joao Martins: