Я пытаюсь получить вершину, используя функции индексации, но получаю только NullPointerException.
Вот соответствующие части из моего кода:
Map<String, String> config = new HashMap<String, String>();
config.put( Config.NODE_KEYS_INDEXABLE, "type, categoryName" );
config.put( Config.NODE_AUTO_INDEXING, "true" );
GraphDatabaseService neoGraphDbService = new EmbeddedGraphDatabase(dblocation,config);
Graph tiGraphDb = new Neo4jGraph(neoGraphDbService, false);
...
//This category is saved correctly
ICategory mashineCategory = manager.frame(tiGraphDb.addVertex(null),
ICategory.class);
//this Property should be indexable...
mashineCategory.setCategoryName("mashineCategory");
mashineCategory.setType(NodeTypes.CATEGORY.toString());
...
//Here I´m getting a NullPointerException
String catName = "mashineCategory";
Vertex foundMashineCategory = ((IndexableGraph)tiGraphDb).getIndex(Index.VERTICES, Vertex.class).get("categoryName", catName).iterator().next();
при отладке могуобратите внимание, что autoIndex из rawGraph (Neo4j Graph) имеет включенный autoindex с правильными значениями.Глядя на Tinkerpop - график, индекс кажется пустым ...