.1 测试代码
.1-1 写入代码
public static void writeIndex() throws IOException{
Directory directory = FSDirectory.open(Paths.get("/Users/waixingren/bigdata-java/mysolr52test/lucenecountdata"))
Analyzer analyzer = new StandardAnalyzer()
IndexWriterConfig config = new IndexWriterConfig(analyzer)
config.setUseCompoundFile(false)
IndexWriter indexWriter = new IndexWriter(directory, config)
Document doc1 = newDoc("1", "cubeli", "one of tencent employee")
Document doc2 = newDoc("2", "liyong", "one of tencent employee")
Document doc3 = newDoc("3", "yangziying", "one of tencent employee")
Document doc4 = newDoc("4", "litairan", "one of tencent employee")
Document doc5 = newDoc("5", "zhanshan", "one of tencent employee")
Document doc6 = newDoc("6", "