I'm using the following java configuration for my Neo4j (using SDN 4.0.0.RELEASE) based application, with unit tests:
...
@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");
}
...
I created on getSessionFactory()
a full-text node_auto_index
. I'm actually missing how to configure my current in-memory istance of Neo4j, because I need to set those properties:
node_auto_indexing=true
node_keys_indexable=title
I read on "Good Relationships: The Spring Data Neo4j Guide Book" that
InProcessServer is useful for test and development environments, but is not recommended for production use. This implementation will start a new instance of CommunityNeoServer running on an available local port and return the URL needed to connect to it.
Do I need to use CommunityNeoServer
instead? Should I use it even if it's deprecated? In this case, how can I configure it for an in-memory database that will support node auto indexing?