我想生成网站上使用最多的单词的列表。应用程序应该抓取网站的内容。 有谁知道这是否可以通过Solr来完成或者任何其他技术?
列表可以是 php 对象/数组或 xml 文件。
最佳答案
您可能想检查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.
这给出了通过分词器和过滤器的索引术语,因此如果您需要按原样术语,则可以改变字段分析。 (可能使用字段类型字符串)
关于php - 使用 Solr 等的网站上最常用的单词,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7723435/