我对Solr很陌生。试图使用solr-cell来索引pdf文件。
使用: DataImportHandler
<requestHandler name="/dataimport" class="solr.DataImportHandler">
<lst name="defaults">
<str name="config">tika-data-config.xml</str>
</lst>
tika-config.xml
<dataConfig>
<dataSource type="BinFileDataSource" />
<document>
<entity name="tika-test" processor="TikaEntityProcessor"
url="C:/solr-4.9.0/contrib/extraction/src/test-docs/extraction/apache-solr-ref-guide-4.9.pdf" format="text">
<field column="Author" name="author" meta="true"/>
<field column="title" name="title" meta="true"/>
<field column="text" name="text"/>
</entity>
</document>
Schema.xml
<field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="author" type="text_general" indexed="true" stored="true"/>
<!-- catchall field, containing all other searchable text fields (implemented
via copyField further on in this schema -->
<field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>在我从solr运行数据导入处理程序之后,它说处理了1个文档,更新了一个文档。很好,因为我只提供一个文件
但是,当我使用Q执行搜索时,就像在solr中一样,它给出了以下内容
"response": {
"numFound": 1,
"start": 0,
"docs": [
{}
]
}我不知道我遗漏了什么,我无法使用solr文档找到任何东西。这是一个非常简单的例子,所以如果所有的conf都是正确的,那么它应该是有效的:
发布于 2016-04-21 13:21:43
您需要在索引文档之后提交。或重新加载核心或重新启动Solr
(请参阅下面的URL,根据您更改URL名称)
http://127.0.0.1:8080/solr/admin/cores?action=RELOAD&core=core1
发布于 2016-04-22 21:58:14
解决这些问题的最简单方法是取消注释/定义具有string类型(存储和索引)的动态字段*。这样,您通过配置获得的每个字段都会显示出来。一旦该部分正确,您将返回并微调您的导入定义和模式。
https://stackoverflow.com/questions/36764240
复制相似问题