2

Trying to implement auto_indexing using the details gleaned from this thread

Not really getting any success in retrieving nodes using the index.

My neo4j.properties:

node_keys_indexable=title,bucket_type,username
node_auto_indexing=true
relationship_auto_indexing=true
relationship_keys_indexable=since

This is what I do to create the node. The node creation works.

user = Neo.create_node({:class_name => "User", :username => "foobar1"})

This is what I do to find the node using the index:

start user=node:node_auto_index(username = 'foobar1') return user

doesnt return anything. Any ideas why? Any way to inspect the contents of an index?

Community
  • 1
  • 1
udit
  • 2,745
  • 3
  • 33
  • 44
  • One way to inspect the contents of an index would be to query it in the object browser of the Web Dashboard. But this query didn't return any results either node:index:node_auto_index:username:* Even though I can verify that the index exists by looking at the 'Index Manager' section of the Web dashboard – udit May 17 '12 at 18:58
  • what version of neo4j are you using? – Michael Hunger May 17 '12 at 21:44
  • I think the config syntax changed after 1.6 can you try the older: node_autoindexing_enabled=true instead? – Michael Hunger May 17 '12 at 22:41
  • didn't help. Ill try upgrading to 1.7 then – udit May 17 '12 at 22:53
  • Upgrading to 1.7 didnt make it work either. OTOH, the commented-out property in the template neo4.properties that got installed with 1.7 mentions 'node_autoindexing_enabled' not 'node_autoindexing'. Is the latter the newer value or is it just a leftover reference ? – udit May 18 '12 at 02:24
  • it is node_auto_indexing the 1.7 properties file is wrong in this account, is is changed in master for 1.8 – Michael Hunger May 18 '12 at 20:32
  • did you try to add the node with the title property in web-admin to see if it works there? and node_auto_indexing (with 2 slashes) should work – Michael Hunger May 18 '12 at 20:33

0 Answers0