我已经将freebase转储导入到neo4j。但目前我正面临着由于db的大小而得到查询的问题。虽然导入我刚刚创建节点索引并索引URI属性索引为每个节点。对于每个节点,我都添加了多个属性,如label_en,type_content_type_en。在neo4j节点属性值上添加索引
props.put(URI_PROPERTY, subject.stringValue());
Long subjectNode = db.createNode(props);
tmpIndex.put(subject.stringValue(), subjectNode);
nodeIndex.add(subjectNode, props);
现在我的密码查询是这样的。哪些超时。我无法在label_en属性上添加索引。任何人都可以帮忙吗?
match (n)-[r*0..1]->(a) where n.label_en=~'Hibernate.*' return n, a
更新
BatchInserter db = BatchInserters.inserter("ttl.db", config);
BatchInserterIndexProvider indexProvider = new LuceneBatchInserterIndexProvider(db);
BatchInserterIndex index = indexProvider.nodeIndex("ttlIndex", MapUtil.stringMap("type", "exact"));
问题:当我在nodeindex添加节点i增加了财产URI
props.put(URI_PROPERTY, subject.stringValue());
Long subjectNode = db.createNode(props);
nodeIndex.add(subjectNode, props);
在代码后,我又增加属性到节点(命名为label_en)。但我没有添加或更新nodeindex。所以根据我的理解,lucene没有将label_en属性编入索引。我的图形已经建好了,所以我试图在我的节点的label_en属性上添加索引,因为我的查询是在label_en上的。