This page discusses a number of advanced indexing topics. Be sure to read about Titan's indexing system first.
For some use cases, it can be beneficial to register a property key with multiple index backends. This is supported by Titan.
For instance, consider the scenario where user vertices have the property key name
which stores the full name of the user – first, middle, and last name. We define the name
key as follows:
g.makeType().name("name").dataType(String.class).indexed(Vertex.class).indexed("search",Vertex.class).unique(Direction.OUT).makePropertyKey()
Defining registering the name
key with the standard index and an external full-text index has the following advantages:
g.query().has("name",EQUAL,"John Doe").vertices()
g.query().has("name",CONTAINS,"John").vertices()
Titan will automatically route the index request to the correct index backend.