Google Groups

Re: [Neo4j] how to index node properties between embedded java and ruby rails using HA cluster


Michael Hunger May 17, 2012 3:45 AM
Posted in group: Neo4j
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>:

> 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