0

I want to update the indexes when an indexed value changes, like the example below:

# add a saved node to index
$neo_server.add_node_to_index("user_index", "email", "test@test.com", node)


# update node properties
$neo_server.set_node_properties(node, {:email => "new_email@test.com"})


# query node
$neo_server.get_node_index("users_index", "email", "new_email@test.com") # => nil

I need to update the user_index with the new email right? 1) If I add the new property ("new_email@test.com") to the index does it automatically replace the old one ("test@test.com")? 2) I tested the auto_index but I still get the same problem when querying the new address.

$neo_server.set_node_auto_index_status(true)
$neo_server.create_node_auto_index
$neo_server.add_node_auto_index_property('email')

Any idea how to fix this?

ksiomelo
  • 1,878
  • 1
  • 33
  • 38

1 Answers1

0

I think you must delete the old node index, change the node value and add the new one to the index :)

Volcano
  • 54
  • 1