use of com.thinkaurelius.titan.core.PropertyKey in project incubator-atlas by apache.
the class Titan1GraphManagement method createExactMatchVertexIndex.
public void createExactMatchVertexIndex(String propertyName, boolean enforceUniqueness, List<AtlasPropertyKey> propertyKeys) {
TitanManagement.IndexBuilder indexBuilder = management.buildIndex(propertyName, Vertex.class);
for (AtlasPropertyKey key : propertyKeys) {
PropertyKey titanKey = TitanObjectFactory.createPropertyKey(key);
indexBuilder.addKey(titanKey);
}
if (enforceUniqueness) {
indexBuilder.unique();
}
indexBuilder.buildCompositeIndex();
}
use of com.thinkaurelius.titan.core.PropertyKey in project incubator-atlas by apache.
the class Titan1GraphManagement method createFullTextIndex.
@Override
public void createFullTextIndex(String indexName, AtlasPropertyKey propertyKey, String backingIndex) {
PropertyKey fullText = TitanObjectFactory.createPropertyKey(propertyKey);
management.buildIndex(indexName, Vertex.class).addKey(fullText, com.thinkaurelius.titan.core.schema.Parameter.of("mapping", Mapping.TEXT)).buildMixedIndex(backingIndex);
}
Aggregations