我如何指示提取请求处理程序在构造我发送给它的文档的“内容”时忽略元数据/标题等?
例如,我创建了一个 MS Word 文档,其中只包含单词“SEARCHWORD”而没有其他内容。但是,当我将此文档发送到我的 solr 索引时,它的内容将映射到我的“正文”字段,如下所示:
<str name="body">
Last-Printed 2009-02-05T15:02:00Z Revision-Number 22 Comments stream_source_info
myfile Last-Author Inigo Montoya Template Normal.dotm Page-Count 1 subject Application-Name
Microsoft Macintosh Word Author Jesus Baggins Word-Count 2 xmpTPg:NPages 1 Edit-Time
108600000000 Creation-Date 2008-11-05T20:19:00Z stream_content_type application/octet-stream
Character Count 14 stream_size 31232 stream_name /Applications/MAMP/tmp/php/phpHCIg7y
Some Company Content-Type application/msword Keywords Last-Save-Date
2012-05-01T18:55:00Z SEARCHWORD
</str>
我想要的只是文档的正文,在本例中是“SEARCHWORD”一词。
为了进一步参考,这是我的提取处理程序:
<requestHandler name="/update/extract"
startup="lazy"
class="solr.extraction.ExtractingRequestHandler" >
<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">body</str>
<str name="lowernames">true</str>
<str name="uprefix">ignored_</str>
</lst>
</requestHandler>