如何减少生成的Lucene/Solr索引的大小? [英] How to reduce the size of a generated Lucene/Solr index?

查看:170
本文介绍了如何减少生成的Lucene/Solr索引的大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究搜索系统的原型.

I am working on a prototype of a search system.

我在oracle中有一个带有某些字段的表.我生成的数据看起来很真实.大约300.000行. 例如:

I have a table in oracle with some fields. I generated data that looks real. Around 300.000 rows. For example:


PaymentNo|Datetime        |AmountEuro|PayersName            |PayersPhoneNo|ReceiversLegal|ReceiversAcc
2314     |2015-07-21T15:14|15.63     |Clinton, Barack Anjela|1.918.0060657|Nasa          |5555569778664190000
230338   |2015-08-01T15:14|34.87     |Merkel, George Donald |1.653.0060658|PepsiCo       |7777828443194736000

(实际上还有更多列)

oracle中表的大小为62 MB(Toad报告)

The size of table in oracle 62 MB (Toad reports)

我将表导入了Solr 5.2.1(在Windows中). 带有数据的索引的大小为88 MB(在磁盘上). 没有数据的索引大小为67 MB.

I imported table into Solr 5.2.1 (in Windows). The size of index with data is 88 MB (on disk). The size of index without data is 67 MB.

我的问题是:我可以减小索引的大小吗?

My question is: Can I decrease the size of index?

这些选项已经过测试: 减少索引表列的数量.关闭Solr中的数据存储.从索引中排除部分行.

These options are already tested: Decreasing the amount of indexed table columns. Switching off data storage in Solr. Excluding some part of rows from index.

我需要一个额外的机会来减小索引的大小. 你知道任何?

I need an extra opportunity to decrease a size of an index. Do you know any?

推荐答案

您可以使用提供的所有见解这里.我想分享一些其他要点.

You can use all the insights provided here. Some additional points I wanted to share.

Solr会重复数据以提供对索引数据的快速搜索.关于so​​lr的重要一件事是,它使用不可变的数据结构来存储所有数据.

Solr does duplication of the data for providing the fast search over indexed data. One important thing about solr is, it uses immutable data structure for storing all the data.

  • 术语词典:索引术语的词典及其出现频率和到发布列表的偏移量.
  • 术语向量:Solr为每个索引文档存储术语向量.对于每个文档,这实际上是一个单独的反向索引.通常这会占用大量存储空间.
  • 存储文档:按顺序存储每个文档及其字段.
  • 文档值:将所有文档的字段存储在一起.这类似于列式数据存储.

如果不使用solr的solr高亮功能,则可以禁用文档级术语向量存储.

You can disable the document level Term Vectors storage if you are not using solr highlighting feature of the solr.

此外,Solr对不同类型的数据使用许多不同的压缩技术.它使用位打包/vint压缩来发布列表和数值. LZ4压缩,用于存储的字段和项向量.它使用FST数据结构存储术语词典. FST是Trie数据结构的一种特殊实现.

Additionally, Solr uses many different compression techniques for different type of data. It uses bit packing/vint compression for posting lists and numerical values. LZ4 compression for stored fields and term vectors. It uses FST data structure for storing the Term Dictionary. FST is an special implementation of Trie data structure.

这篇关于如何减少生成的Lucene/Solr索引的大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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