1
我正在使用Solr 3.3.0版本,我需要索引和搜索图像。我能够索引图像文件,但无法将其检索为搜索结果。 你们能帮助我吗?在Solr中搜索图像3.3.0
我的数据-config.xml文件是:
<dataConfig>
<dataSource type="BinFileDataSource" name="bin"/>
<document>
<entity name="f" processor="FileListEntityProcessor" recursive="true"
rootEntity="false"
dataSource="null" baseDir="C:/Files"
fileName=".*\.(DOC)|(PDF)|(XML)|(xml)|(JPEG)|(jpg)|(ZIP)|(zip)|(pdf)|(doc)" onError="skip">
<entity name="tika-test" processor="TikaEntityProcessor"
url="${f.fileAbsolutePath}" format="text" dataSource="bin" onError="skip">
<field column="Author" name="author" meta="true"/>
<field column="title" name="title" meta="true"/>
<field column="text" name="text"/>
<field column="id" name="id"/>
<field column="Keywords" name="keywords" meta="true"/>
</entity>
<field column="file" name="fileName"/>
<field column="fileAbsolutePath" name="links"/>
</entity>
</document>
</dataConfig>
这工作正常图像相比其他类型,我没能获得图像搜索结果
你可以请添加有关您的设置的详细信息?你使用什么描述符来索引它们,以及你使用什么查询来检索它们? – jpountz
“我无法在搜索结果中获取图片”是否意味着您的图片没有被编入索引(意味着即使通过MatchAllDocsQuery,“{!lucene} *:*'”也不会返回),或者Tika失败从你的图像中提取元数据(在这种情况下,文档将出现,但只有'file'和'fileAbsolutePath'字段(如果在索引时提供的话)? – jpountz
图像被索引,但是当我尝试使用某些元信息作者或甚至是内容,他们根本不会出现在结果中,我不确定图像是否像其他富文档一样在内容的基础上被搜索,或者是否有其他特定的搜索图像方式? – Jagdish