lucene中数据是如何存储的

发布于 2025-01-01 10:51:12 字数 84 浏览 2 评论 0原文

我知道lucene创建一个索引并存储所有数据。任何人都可以告诉我数据如何存储在平面文件中吗?或者他们使用什么样的算法将数据存储在后端以便他们可以快速检索?

I know that lucene creates an index and stores all the data .Can any one tell me how the data is stored in flat file? or what kind of algorithms they use to store the data in backend so that they can retrieve it quickly?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

撧情箌佬 2025-01-08 10:51:12

不知道这是否是您所要求的。但更普遍的答案是他们使用/实现倒排索引。 Lucene 如何存储它的具体信息可以在 文件格式 中找到(正如 milan 所说) )。

但总体思路是,它们存储倒排索引数据结构和其他辅助数据结构,以帮助快速回答查询。例如,它存储每个文档和每个术语的 IDF 的规范向量(逆文档频率)。 Lucene 还存储实际的文档字段,但它位于倒排索引之外。

Don't know if this is what you asked for. But the more general answer is that they use/implement a Inverted Index. The specifics of how Lucene stores it you can find in file formats (as milan said).

But the general idea is that they store a Inverted Index data structure and other auxiliar data structures to help answer queries quickly. For example, it stores a vector of norms for each document and each term's IDF (inverse document frequency). Lucene also stores the actual document fields, but that is outside the Inverted Index.

谢绝鈎搭 2025-01-08 10:51:12

您可以在文件格式部分找到所有解释。

You can find all that explained in the file formats section.

就像说晚安 2025-01-08 10:51:12

您可以阅读这本书 http://nlp.stanford.edu/IR-book/了解信息检索系统中使用的数据结构、算法和模型

You can read this book http://nlp.stanford.edu/IR-book/ to know about the data structures, algorithms and models used in information retrieval systems

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文