2012-01-25 35 views

回答

3

我想你仍然在使用默認的緩存設置。檢查您的當前配置的設置。這是你可以嘗試一下,從solrconfig.xml中

典型的默認設置

<!-- An optimization for use with the queryResultCache. When a search 
    is requested, a superset of the requested number of document ids 
    are collected. For example, if a search for a particular query 
    requests matching documents 10 through 19, and queryWindowSize is 50, 
    then documents 0 through 49 will be collected and cached. Any further 
    requests in that range can be satisfied via the cache. --> 
<queryResultWindowSize>20</queryResultWindowSize> 
<!-- Maximum number of documents to cache for any entry in the queryResultCache. --> 
<queryResultMaxDocsCached>200</queryResultMaxDocsCached> 

上面的兩個參數影響分頁,例如,如果你的應用所顯示25項結果/頁&用戶正在瀏覽的5通常將頁面設置爲queryResultWindowSize,queryResultMaxDocsCached爲125.這將緩存典型用戶行爲所需的結果。

注意:這些會對你的記憶力產生影響,影響程度取決於你的文件大小&其他設置。

+0

真的很好的建議,謝謝! –