// EmbeddedReadOnlyGraphDatabase graphDB = getReadOnlyGraphDatabase(servletContext);
EmbeddedGraphDatabase graphDB = getGraphDatabase(servletContext);
Index<Node> index = (Index<Node>)servletContext.getAttribute(SEARCH_IDX_GWT);
if (index == null){
IOHelper.log("Adding search index - " + SEARCH_IDX_GWT + "- to servletContext.");
index = graphDB.index().forNodes(SEARCH_IDX_NEO4J,
MapUtil.stringMap("analyzer", CustomTokenAnalyzer.class.getName())
);
((LuceneIndex<Node>) index).setCacheCapacity("key", 300000);
servletContext.setAttribute(SEARCH_IDX_GWT,index);
}