Unit testing 用指数测试neo4j
我想用nosql单元测试我的neo4j项目。只要我不需要lucene索引,这就行了。有没有办法用索引创建测试数据库? 我认为graphml不可能提供索引,因此我尝试使用如下自动索引:Unit testing 用指数测试neo4j,unit-testing,nosql,neo4j,Unit Testing,Nosql,Neo4j,我想用nosql单元测试我的neo4j项目。只要我不需要lucene索引,这就行了。有没有办法用索引创建测试数据库? 我认为graphml不可能提供索引,因此我尝试使用如下自动索引: @Before public void startAutoIndex(){ AutoIndexer<Node> nodeAutoIndexer = graphDb.index().getNodeAutoIndexer(); nodeAutoIndexer.startAutoIndexin
@Before
public void startAutoIndex(){
AutoIndexer<Node> nodeAutoIndexer = graphDb.index().getNodeAutoIndexer();
nodeAutoIndexer.startAutoIndexingProperty( "id" );
nodeAutoIndexer.startAutoIndexingProperty( "refname" );
nodeAutoIndexer.setEnabled(true);
}
@之前
公共无效startAutoIndex(){
自动索引器nodeAutoIndexer=graphDb.index().getNodeAutoIndexer();
nodeAutoIndexer.startAutoIndexingProperty(“id”);
nodeAutoIndexer.startAutoIndexingProperty(“refname”);
nodeAutoIndexer.setEnabled(true);
}
这对我不管用。
是否有其他方法实现自动索引
致意
一月通常有两种方式
geoff
xml导出格式conf/server.properties
文件在服务器端设置自动索引。在此处,设置以下行:
节点自动索引=真节点\键\可索引=id,参照名称
id
和refname
作为其属性-如果需要neo4j数据库的常规id而不是唯一id,则无需将id指定为索引)