Search in sources :

Example 6 with AtlasGraphIndex

use of org.apache.atlas.repository.graphdb.AtlasGraphIndex in project incubator-atlas by apache.

the class GraphBackedSearchIndexerTest method verifyFullTextIndex.

@Test
public void verifyFullTextIndex() {
    AtlasGraph graph = TestUtils.getGraph();
    AtlasGraphManagement managementSystem = graph.getManagementSystem();
    try {
        AtlasGraphIndex fullTextIndex = managementSystem.getGraphIndex(Constants.FULLTEXT_INDEX);
        assertTrue(fullTextIndex.isMixedIndex());
        Arrays.asList(fullTextIndex.getFieldKeys()).contains(managementSystem.getPropertyKey(Constants.ENTITY_TEXT_PROPERTY_KEY));
    } finally {
        managementSystem.rollback();
    }
}
Also used : AtlasGraphManagement(org.apache.atlas.repository.graphdb.AtlasGraphManagement) AtlasGraphIndex(org.apache.atlas.repository.graphdb.AtlasGraphIndex) AtlasGraph(org.apache.atlas.repository.graphdb.AtlasGraph) Test(org.testng.annotations.Test)

Aggregations

AtlasGraphIndex (org.apache.atlas.repository.graphdb.AtlasGraphIndex)6 AtlasGraph (org.apache.atlas.repository.graphdb.AtlasGraph)2 AtlasGraphManagement (org.apache.atlas.repository.graphdb.AtlasGraphManagement)2 AtlasPropertyKey (org.apache.atlas.repository.graphdb.AtlasPropertyKey)2 Test (org.testng.annotations.Test)2 ArrayList (java.util.ArrayList)1