use of org.janusgraph.core.schema.JanusGraphManagement.IndexBuilder in project atlas by apache.
the class AtlasJanusGraphManagement method createVertexCompositeIndex.
@Override
public void createVertexCompositeIndex(String propertyName, boolean isUnique, List<AtlasPropertyKey> propertyKeys) {
IndexBuilder indexBuilder = management.buildIndex(propertyName, Vertex.class);
for (AtlasPropertyKey key : propertyKeys) {
PropertyKey janusKey = AtlasJanusObjectFactory.createPropertyKey(key);
indexBuilder.addKey(janusKey);
}
if (isUnique) {
indexBuilder.unique();
}
indexBuilder.buildCompositeIndex();
}
use of org.janusgraph.core.schema.JanusGraphManagement.IndexBuilder in project atlas by apache.
the class AtlasJanusGraphManagement method createEdgeCompositeIndex.
@Override
public void createEdgeCompositeIndex(String propertyName, boolean isUnique, List<AtlasPropertyKey> propertyKeys) {
IndexBuilder indexBuilder = management.buildIndex(propertyName, Edge.class);
for (AtlasPropertyKey key : propertyKeys) {
PropertyKey janusKey = AtlasJanusObjectFactory.createPropertyKey(key);
indexBuilder.addKey(janusKey);
}
if (isUnique) {
indexBuilder.unique();
}
indexBuilder.buildCompositeIndex();
}
use of org.janusgraph.core.schema.JanusGraphManagement.IndexBuilder in project atlas by apache.
the class AtlasJanusGraphManagement method createVertexMixedIndex.
@Override
public void createVertexMixedIndex(String indexName, String backingIndex, List<AtlasPropertyKey> propertyKeys) {
IndexBuilder indexBuilder = management.buildIndex(indexName, Vertex.class);
for (AtlasPropertyKey key : propertyKeys) {
PropertyKey janusKey = AtlasJanusObjectFactory.createPropertyKey(key);
indexBuilder.addKey(janusKey);
}
indexBuilder.buildMixedIndex(backingIndex);
}
use of org.janusgraph.core.schema.JanusGraphManagement.IndexBuilder in project atlas by apache.
the class AtlasJanusGraphManagement method createFullTextMixedIndex.
@Override
public void createFullTextMixedIndex(String indexName, String backingIndex, List<AtlasPropertyKey> propertyKeys) {
IndexBuilder indexBuilder = management.buildIndex(indexName, Vertex.class);
for (AtlasPropertyKey key : propertyKeys) {
PropertyKey janusKey = AtlasJanusObjectFactory.createPropertyKey(key);
indexBuilder.addKey(janusKey, org.janusgraph.core.schema.Parameter.of("mapping", Mapping.TEXT));
}
indexBuilder.buildMixedIndex(backingIndex);
}
use of org.janusgraph.core.schema.JanusGraphManagement.IndexBuilder in project atlas by apache.
the class AtlasJanusGraphManagement method createEdgeMixedIndex.
@Override
public void createEdgeMixedIndex(String indexName, String backingIndex, List<AtlasPropertyKey> propertyKeys) {
IndexBuilder indexBuilder = management.buildIndex(indexName, Edge.class);
for (AtlasPropertyKey key : propertyKeys) {
PropertyKey janusKey = AtlasJanusObjectFactory.createPropertyKey(key);
indexBuilder.addKey(janusKey);
}
indexBuilder.buildMixedIndex(backingIndex);
}
Aggregations