【发布时间】:2015-03-11 21:10:01
【问题描述】:
我有以下测试:
@Test
public void testAutoIndexingAndFuzzySearch() {
GraphDatabaseService graphDb = template.getGraphDatabaseService();
Index<Node> autoIndex = graphDb.index().forNodes("node_auto_index");
graphDb.index().setConfiguration(autoIndex, "type", "fulltext");
graphDb.index().setConfiguration(autoIndex, "to_lower_case", "true");
graphDb.index().setConfiguration(autoIndex, "analyzer", StandardAnalyzerV36.class.getName());
sampleDataGenerator.generateSampleDataJava();
List<Product> products = // query - "name:aDbma~";
Assert.assertFalse(products.isEmpty());
}
每次在新的嵌入式数据库上测试都会失败。自动索引不起作用。测试仅每第二次开始工作。第一次产品是空的..
这种行为的原因可能是什么?
【问题讨论】:
标签: lucene neo4j full-text-search cypher spring-data-neo4j