I am going to have multiple graphs created for my users. Is there a way to set up compound indexes so they work on a user level? In other words, when I add a node to the user's graph, I want it to be indexed against only the nodes inside this graph, but not against the nodes in the neighboring graph. I can create new database for new graph, but not sure if that's the preferred way to go. Also, is there a limit on number of databases I can create, say, in Aura, or in the community version?
An index is created for a label and one or more properties. As such, you can’t have an index unique to a single customer.
I assume you are going to segment each customer by a CustomerId property on each node. If so, you can create a composite index on the node’s label for the CustomerId property and the nodes primary key property. This will allow you to search these nodes by its primary key while enforcing a constraint for the specified user. You can do the same with any other property or properties you want to search over.