andreasronge/neo4j — pull request #65 by endeepak (2011-10-22 03:58:11+00:00)
Title: Provide flexibility to define index prefix

Hi,

The previous implementation uses `name` property as index prefix. The problem is most of the domain models have name property and it can change in time. In our case we use company as tenant node (thread local ref node). When the model name changes, index search will break since it uses a different index location.

This commit allows tenant node to decide index prefix. One example implementation could be to define `_index_prefix` to be `id` or any immutable unique property of the node.

The implementation is backward compatible i.e it fallbacks to `name` property if `_index_prefix` method is not defined.

Build Status: http://travis-ci.org/#!/endeepak/neo4j/builds/244044