首先建立公共资源
package testlucene;

public class Constants {

  public final static String INDEX_FILE_PATH = "c:\\test"; //待搜索的文件
  public final static String INDEX_STORE_PATH = "c:\\index"; //索引的位置
}

建立索引
package testlucene;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.Reader;

文章来源:http://www.gins.cn/blog/article.asp?id=46

相关文章:

  • 2022-12-23
  • 2021-10-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-05
  • 2022-12-23
  • 2021-11-04
  • 2021-07-20
  • 2021-10-24
  • 2022-12-23
  • 2021-11-09
相关资源
相似解决方案