0
配置node_auto_index我用下面的Java配置我的Neo4j(使用SDN 4.0.0.RELEASE)的應用,單元測試:不能與InProcessServer()SDN 4
...
@Bean
public Neo4jServer neo4jServer() {
return new InProcessServer();
}
@Bean
public SessionFactory getSessionFactory() {
Neo4jRequest<String> neo4jRequest = new DefaultRequest(httpClient);
String json = "{" + "\"name\" : \"node_auto_index\", " + "\"config\" : {" + "\"type\" : \"fulltext\", "
+ "\"provider\" : \"lucene\"" + "}" + "}";
neo4jRequest.execute(neo4jServer().url() + "db/data/index/node/", json);
return new SessionFactory("org.myproject.domain");
}
...
我創建在getSessionFactory()
的全文node_auto_index
。實際上,我缺少的是如何配置的Neo4j我目前的內存istance,因爲我需要設置這些屬性:
node_auto_indexing=true
node_keys_indexable=title
我的「良好關係:春季數據Neo4j的指南書」讀到
InProcessServer對於測試和開發環境很有用,但不推薦用於生產用途。此實現將啓動在可用本地端口上運行的新的CommunityNeoServer實例,並返回連接到該實例所需的URL。
是否需要使用CommunityNeoServer
代替?我應該使用它,即使它已被棄用?在這種情況下,如何將它配置爲支持節點自動索引的內存數據庫?