Ngram 的弹性搜索索引?
Elastic search index for Ngram?
说我有一句话This is a new city
- Elasticsearch 是否为一个词的所有可能 permutation/combination 创建索引。例如对于单词 "city",它会创建索引 "it"、"ty"、"ity"、"cit" 等吗?
- 这些索引是在文档存储时创建的还是在 运行 时创建的?
- 这些索引是保存在内存中还是数据库中?
这取决于你的 tokenizer. By default Elasticsearch uses Standant Tokenizer 哪个 divides text into terms on word boundaries, as defined by the Unicode Text Segmentation algorithm.
这意味着你的句子将被标记为 this, is, a, new, city
。如果愿意,您可以创建自定义分词器。
当您将文档放入 Elasticsearch 时,文档会被编入索引。
数据保存在文件系统中:https://www.elastic.co/blog/found-dive-into-elasticsearch-storage
这是一篇关于内部结构的博客post:https://www.elastic.co/blog/found-elasticsearch-from-the-bottom-up
说我有一句话This is a new city
- Elasticsearch 是否为一个词的所有可能 permutation/combination 创建索引。例如对于单词 "city",它会创建索引 "it"、"ty"、"ity"、"cit" 等吗?
- 这些索引是在文档存储时创建的还是在 运行 时创建的?
- 这些索引是保存在内存中还是数据库中?
这取决于你的 tokenizer. By default Elasticsearch uses Standant Tokenizer 哪个
divides text into terms on word boundaries, as defined by the Unicode Text Segmentation algorithm.
这意味着你的句子将被标记为this, is, a, new, city
。如果愿意,您可以创建自定义分词器。当您将文档放入 Elasticsearch 时,文档会被编入索引。
数据保存在文件系统中:https://www.elastic.co/blog/found-dive-into-elasticsearch-storage
这是一篇关于内部结构的博客post:https://www.elastic.co/blog/found-elasticsearch-from-the-bottom-up