2013-03-12 34 views
0

我已將3762587個文檔編入索引。 我仔細檢查了我的數據庫,以及相同數量的行/文檔。索引文件未在查詢搜索中顯示

我正在查詢鏈接,所以毫米參數是100%匹配。 問題是,有些查詢不返回結果,即使我可以看到我的數據庫中的記錄。 我不明白爲什麼一些查詢工作,有些不是...

這是我的schema.xml:

<fields> 
      <field name="id" type="string" indexed="true" stored="false" required="true" /> 
      <field name="title" type="string" indexed="true" stored="true"/> 
      <field name="imgUrl" type="string" indexed="true" stored="true"/> 
      <field name="_version_" type="long" indexed="true" stored="true" multiValued="false" /> 
</fields> 

我還配置了請求處理的圖像鏈接搜索:

<requestHandler name="/image" class="solr.SearchHandler"> 
    <lst name="defaults"> 
     <str name="echoParams">explicit</str> 
     <str name="wt">json</str> 
     <str name="indent">true</str> 
     <str name="df">imgUrl</str> 
     <str name="defType">edismax</str> 
     <str name="qf">imgUrl</str> 
     <str name="mm">100%</str> <!-- Minimum match --> 
     <str name="rows">10</str> 
     <str name="fl">*,score</str> 
    </lst> 
    </requestHandler> 

一個請求看起來像這樣:

myserver/solr/collection1/image?q=http://imagesserver.com/images/21533515483100.jpg 
+0

也許我應該將字段中的更改爲text_ws? 因爲這個:http://stackoverflow.com/questions/3493499/solr-index-appears-to-be-valid-but-returns-no-results 但仍然,爲什麼有些查詢返回結果,有些不是?如果這是我希望總是收到0次點擊的問題... – ItayD 2013-03-12 12:05:55

回答

0

是的,我的解決方案的工作原理! 我將schema.xml中的類型從字符串更改爲text_ws,現在我總能得到答案!