我正在阅读文档并想知道是否有可能不会读取流两次以便用Tika解析它,获取元数据+内容并将其索引到Lucene中?
我想避免在解析后将文件存储在内存中,因为它可能太大了。
我正在阅读以下链接,似乎它将已解析的文档内容保存在内存中 - http://johnreece.com/wordpress/2011/03/13/a-concise-tikalucene-content-parsing-and-indexing-example/
(也许以某种方式与“Anyways of making a Lucene field stored as well as streamed through a reader”相关联)
(另外,我想确保Lucene的TextField
处理Reader
而没有从String
处理{{1}},这应该消耗内存)