Nutla --- lucene + hadoop 分布式搜索运行框架

来源:互联网 发布:时间函数php 编辑:程序博客网 时间:2024/05/16 08:58

Nutla

http://code.google.com/p/nutla/

Katta

http://katta.sourceforge.net/

介绍:http://www.iteye.com/topic/366431

参考资料:

http://www.blogjava.net/nianzai/category/45541.html


让Lucene能搜索HDFS下的索引:

    public static void main(String[] args) throws IOException     {        Configuration conf = new Configuration();           FileSystem fs = FileSystem.get(conf);        FsDirectory dir=new FsDirectory(fs, new Path("nutindex/0/"), false, conf);        IndexReader reader = IndexReader.open(dir);        System.out.println(reader.numDocs());        for(int i=0;i<reader.numDocs();i++)        {           System.out.println(reader.document(i).get("id"));        }        reader.close();   }

其他资料:

http://drdobbs.com/parallel/226300241?pgno=1

http://drdobbs.com/parallel/226300241?pgno=2

http://drdobbs.com/parallel/226300241?pgno=3