Lucene索引doc pdf html
来源:互联网 发布:实现双向数据绑定 编辑:程序博客网 时间:2024/04/29 04:14
索引Doc:tm-extractors-0.4
这原是Apache的POI类库的一部分——HWPF,POI提供了一组操作MS-word/excel等文件的方法,在最近的release版本中HWPF被移出,需要下载独立的tm-extractors-0.4。下面的代码中实现了static方法getDocument(File)返回Lucene的Document类型结果,主要通过调用WordExtractor类的成员方法extractor,该方法能返回一个包含所解析doc文件内容的String类型实例。
索引pdf:使用pdfbox1.2.1,
PDFBox为使用Lucene的开发者专门提供了LucenePDFDocument类,它的static方法getDocument能够直接返回一个Lucene的Document类型结果。所以在为一个pdf文件(例子中为File类型实例pdfFile)创建索引时只要写下如下语句就可以了:
document = LucenePDFDocument.getDocument(pdfFile);
使用 pdfbox1.2.1时,方法被修改了,所以得先提取pdf的内容,再索引。
索引Html
使用htmlparser来解析,同样在代码中定义了static方法getDocument(File)返回Document类型。
创建索引
查询:
参考:http://blog.csdn.net/lilice/archive/2007/05/12/1605731.aspx
- Lucene索引doc pdf html
- Lucene索引前对doc pdf html文件的预处理
- Lucene索引前对doc pdf html文件的预处理
- Lucene 课程设计 检索.doc,.pdf,.html,.execl,.txt格式文件
- lucene索引word/pdf/html/txt文件及检索(搜索引擎)
- lucene 索引非txt文档 (pdf word rtf html xml)
- lucene 索引非txt文档 (pdf word rtf html xml)
- lucene 索引非txt文档 (pdf word rtf html xml)
- lucene索引word/pdf/html/txt文件及检索(搜索引擎)
- lucene 索引非txt文档 (pdf word rtf html xml)
- lucene实现pdf,doc,xls,ppt,htm,html等格式文件的检索
- lucene-索引HTML文档
- lucene-索引HTML文档
- Converting .docx into (.doc, .pdf, .html)
- lucene pdf+doc+ppt+xls+txt+多层文件
- Java Lucene (5):索引PDF文档
- lucene索引word/pdf/html/txt文件及检索(搜索引擎) 转载于http://blog.csdn.net/shiljcn/article/details/6179479
- Solrj创建doc/pdf/txt文件索引,高亮查询
- 纠结啊
- 2010年计算机专业基础综合考试大纲——计算机网络
- Java从入门到精通 - Swing高级JFileFilterTest FileFilter只选择gif,jpg格式
- VBS控制Excel常见方法
- 护士学情书
- Lucene索引doc pdf html
- 读写文件时的掉电保护问题
- 在华为实现的java访问https,多线程,写日志
- 笑一笑
- 对象的创建过程
- MII、GMII、RMII接口介绍
- 谷歌Android系统十大热门关键词 刷机 桌面widget WIFI
- eclipse、android开发环境配置
- js node 操作