2011-09-05 41 views
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> 

這工作正常圖像相比其他類型,我沒能獲得圖像搜索結果

+1

你可以請添加有關您的設置的詳細信息?你使用什麼描述符來索引它們,以及你使用什麼查詢來檢索它們? – jpountz

+0

「我無法在搜索結果中獲取圖片」是否意味着您的圖片沒有被編入索引(意味着即使通過MatchAllDocsQuery,「{!lucene} *:*'」也不會返回),或者Tika失敗從你的圖像中提取元數據(在這種情況下,文檔將出現,但只有'file'和'fileAbsolutePath'字段(如果在索引時提供的話)? – jpountz

+0

圖像被索引,但是當我嘗試使用某些元信息作者或甚至是內容,他們根本不會出現在結果中,我不確定圖像是否像其他富文檔一樣在內容的基礎上被搜索,或者是否有其他特定的搜索圖像方式? – Jagdish

回答

0

ANS)你在Solr的搜索管理員頁面使用索引後的URL查詢.. 當您將圖像編入索引時,它將顯示在概述 solr管理員選項卡.. 假設它沒有顯示文檔和時間solr web pag ** e圖像還沒有編入索引iam s搜索相同的.....