在 Elasticsearch 中获取索引文档的倒排索引 [英] Getting inverted index for indexed documents in Elasticsearch

查看:57
本文介绍了在 Elasticsearch 中获取索引文档的倒排索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很多文档(带有分析文本字段title).它们已在 Elasticsearch 中建立索引,现在我只需要获取字段 title 中每个词的词频 TF 和逆文档频率 IDF,无需任何查询.(只是索引文档并检索字段中所有术语的倒排索引title)

I have many documents (with an analyzed text field title). They have been indexed in Elasticsearch and now I need only to get the term frequency TF and inverse document frequency IDF for each term within the field title without having any query. (just indexing the documents and retrieving the inverted index of all terms in the field title)

这在 Elasticsearch 中可行吗?

Is that possible in Elasticsearch?

推荐答案

我写了一个 教程 关于如何从 ES 获取术语文档矩阵.这确实涵盖了获取 TF 而不是 IDF.这是使用 Python 的 ES 1.6.0.

I wrote a tutorial on how to get a term-document matrix from ES. This does cover getting TFs but not IDFs. This was for ES 1.6.0 using Python.

有关更多信息,您应该查看 TermVectorAPI.

For more you should have a look at the TermVector API.

这篇关于在 Elasticsearch 中获取索引文档的倒排索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆