2
我新的Apache Solr实现,我想用它来索引PDF文件。我设法得到它,至今运行,我现在可以搜索添加PDF文件。检索提取的文本使用Apache Solr实现
不过,我需要能够检索结果的搜索文本。
我发现在默认solrconfig.xml中正是有关的XML片段:
<requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler" startup="lazy">
<lst name="defaults">
<!-- All the main content goes into "text"... if you need to return
the extracted text or do highlighting, use a stored field. -->
<str name="fmap.content">text</str>
<str name="lowernames">true</str>
<str name="uprefix">ignored_</str>
<!-- capture link hrefs but ignore div attributes -->
<str name="captureAttr">true</str>
<str name="fmap.a">links</str>
<str name="fmap.div">ignored_</str>
</lst>
从我从这里(http://www.lucidimagination.com/Community/Hear -from-the-Experts/Articles/Content-Extraction-Tika),我想我必须为存储=“true”和索引=“true”的schema.xml添加一个新字段(例如“content”)。不过,我真的不知道如何准确地做到这一点?
赞赏任何帮助,THX
嗯,我似乎已经管理它,我把“文本”字段的“存储”属性设置为“true”。 – DeX3 2011-02-09 18:15:45