下了最新的lucene,看的教程是3.0的,索引的创建等等内容都变动很多,很多都不知道怎么写,看doc也没有找到,一个是file to document的函数怎么写,还有IndexWriter的第二个参数IndexWriterConfig怎么写,谢谢了

解决方案 »

  1.   

    Directory dir = FSDirectory.open(new File(indexDir));
    IndexWriterConfig conf = new IndexWriterConfig(Version.LUCENE_43,new StandardAnalyzer(Version.LUCENE_43));
    //创建Lucene indexWriter
    IndexWriter writer = new IndexWriter(dir, conf);//与lucene之前的版本有区别
      

  2.   

    嗯啊,谢谢啊,我看的视频,有点没搞清楚,还有一个indexWriter只能添加doc,还要写一个dir转化为doc的函数吗
      

  3.   

    怎么转变为document的函数也指点一下吧,谢谢啦~~~
      

  4.   

    嗯啊,谢谢啊,我看的视频,有点没搞清楚,还有一个indexWriter只能添加doc,还要写一个dir转化为doc的函数吗好像没弄明白,嘿嘿,dir是key ,doc是value是吧,要写一个把file变为doc的文件
      

  5.   

    http://www.liutime.com/javainfo/706/http://www.liutime.com希望能帮到你
      

  6.   

    http://blog.csdn.net/chenghui0317/article/category/1570275http://blog.csdn.net/chenghui0317/article/category/1570275不懂问我。。