2011-10-11 36 views

回答

4

你可能要檢查http://wiki.apache.org/solr/TermsComponent

示例 -

http://host:port/solr/core/terms?terms.fl=title&terms.sort=count 

會給你通過計數(默認)下令場冠軍

terms.fl - Field you want to check the terms on 
terms.sort={count|index} - If count, sorts the terms by the term frequency (highest count first). If index, returns the terms in index order. Default is to sort by count. 

這使索引的所有條款通過標記器和過濾器的術語,所以如果您需要原樣,可以改變字段分析。 (可能使用字段類型字符串)

1

SOLR是一個搜索引擎。它不抓取網站。您需要使用scrapyhttp://scrapy.org/或其他類似工具製作簡單的網站爬蟲。設計一個SOLR模式來記錄數據,抓取網站,向SOLR發送記錄更新。您的具體問題可能會通過網絡管理界面通過SOLR管理菜單上的SCHEMA BROWSER選擇來回答。點擊DYNAMIC FIELDS,選擇你感興趣的領域,並看到10.更改數字爲50,按ENTER並獲得前50名。