string - ElasticSearch数据类型的限制是什么?

标签 string indexing elasticsearch lucene limit

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/

相关文章:

python - 将多维数组中的元素映射到其索引

elasticsearch - 在Elasticsearch中,如何使用空格执行通配符搜索?

elasticsearch - elasticsearch查询中的“exists”对对象不起作用

string - VBA 字符串 255 个字符限制

c++ - 至少出现两次的最长子串 : C++ question

sql - 删除索引是否会重置性能增益?

elasticsearch - 如何在Elasticsearch中的SQL中获得简单的查询多匹配文本?

sql - STRING_AGG with distinct without sub-query

c - 为什么在程序中两次使用 gets() 来获取两个不同数组的输入即使对于第一个数组也只返回第二个输入?

ios - UITableView 索引