user3244615
user3244615

Reputation: 430

creating composite index and a mixed index on the same key in titan graph

Lets assume that we have a user vertex and a property user_email. This field has a unique constraint on it. I have tried creating a mixed index and a composite index on this property key. I was able to achieve that. But is it really a good practice? Can having both types of indices on the same property key have any impact on performance on indexing backend (I am using elastic search)?

Upvotes: 0

Views: 562

Answers (1)

Daniel Kuppitz
Daniel Kuppitz

Reputation: 10904

That's fine and a common practice. Depending on your use cases it can be the case that you need both of the indexes. In your example it might be that you want to

  • ensure uniqueness (standard index required)
  • perform a user login (exact match required)
  • find all users with a hotmail address (mixed index required)

Upvotes: 1

Related Questions