php - 使用 Solr 等的网站上最常用的单词

标签 php solr

我想生成网站上使用最多的单词的列表。应用程序应该抓取网站的内容。 有谁知道这是否可以通过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/

相关文章:

java - 在 Solr DataImportHandler 中从 Oracle 日期获取正确的时间

php - 如何进行条件查询选择

php - 第一个脚本使用 $.ajax 但它不起作用

php - Mysql内连接where值在另一个表中

php - 我可以将 PHPUnit 打包为 phar 吗?

java - Solr 因在 org.apache.solr.core 上打开新搜索器时出错而停止

Linux内存映射文件(已删除)

elasticsearch - 使用其他搜索对弹性结果进行后处理(从Solr迁移)

lucene - 推荐的标题提升?

php - ID 不回显学生姓名的 URL 查询