Here是我们可以在ElasticSearch中用于存储信息的数据类型的列表。
但是我找不到提到数据时间限制的链接。例如,一个字符串字段可以有几个字符?是否与Java限制相同(即Integer.MAX_VALUE或2 ^ 31-1或String约为20亿)?
由于ElasticSearch使用树结构来存储信息,因此我认为可能存在限制,因为大多数RDBMS对数据类型都有严格的限制。
注意:我的问题与系统的内存限制无关。如果我有足够的内存来创建一个非常大的字符串,我可以用ElasticSearch对其进行索引和存储吗?
最佳答案
我不确定Elasticsearch的特定限制,但是luct的限制在Javadoc中列出:
Lucene's current implementation uses a Java int to hold the term index, which means the maximum number of unique terms in any single index segment is ~2.1 billion times the term index interval (default 128) = ~274 billion. This is technically not a limitation of the index file format, just of Lucene's current implementation.
Similarly, Lucene uses a Java int to refer to document numbers, and the index file format uses an Int32 on-disk to store document numbers. This is a limitation of both the index file format and the current implementation. Eventually these should be replaced with either UInt64 values, or better yet, VInt values which have no limit.
关于string - ElasticSearch数据类型的限制是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27624610/