【发布时间】:2017-03-10 23:49:10
【问题描述】:
我正在尝试使用 Windows 版本的帖子索引文档,使用如下命令:
java -Dc=docs -Dauto=yes -Dc=docs -Ddata=files -Drecursive=yes -jar
post.jar C:\docs
我可以看到文档已正确编入索引,但我想存储提取的文本以使用突出显示。我添加到我的托管模式字段中,例如:
<field name="text" type="text_general" multiValued="true" indexed="true" stored="true"/>
<field name="source" type="text_general" multiValued="true" indexed="true" stored="true"/>
<field name="content" type="text_general" multiValued="true" indexed="true" stored="true"/>
<field name="content" type="strings"/>
但它不起作用,我无法返回文档的搜索内容。如何存储从 doc、docx、pdf 文件中提取的文本并将其返回到我的查询中?
【问题讨论】:
-
没有得到你想要的东西。您在结果中突出显示查询词时遇到问题。 ?
-
据我了解,我需要存储提取的文本以使用突出显示。所以,我的问题是我不知道如何检索文档的内容并让 Solr 存储它。抱歉,如果有什么不清楚的地方,但我是 Solr 的新手,我不知道它是如何工作的。
标签: solr highlighting