Sphinx Search / MySQL找到最常用的单词 [英] Sphinx Search / MySQL find most common words
本文介绍了Sphinx Search / MySQL找到最常用的单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个狮身人面像的搜索索引,并希望找到索引中最常见的词。
理想情况下,按照频率排序的单词列表。
如果使用Sphinx无法做到这一点,有没有办法查询mysql表格的文本字段获取相同的统计信息?
解决方案
是的。这很简单。使用索引器使用--buildstops和--buildfreqs
标志构建它们。
$ b
indexer --config / path / to / sphinx.conf indexName --buildfreqs --buildstops freq_wordlist.txt 100000
这个例子给你您的狮身人面像索引中的第一个10万字按其频率排序
I have a sphinx search index and would like to find what are the most common words in my index. Ideally have a list of words ordered by frequency.
If it is not possible to do it using Sphinx, is there a way to query a mysql table's text fields to get the same stat?
解决方案
Yes. This is quite simple. Build them with indexer using the --buildstops and --buildfreqs flags.
indexer --config /path/to/sphinx.conf indexName --buildfreqs --buildstops freq_wordlist.txt 100000
This example gives you the first 100000 word in your sphinx index ordered by its frequency
这篇关于Sphinx Search / MySQL找到最常用的单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文