索引文档后删除模板
Deleting a template after indexing documents
我在弹性搜索中有一个索引,它是使用模板创建的。我正在考虑停止使用模板并使用 NEST 转换为 class 中的属性。
是否可以从服务器中删除模板并继续在同一索引中索引文档?
我知道索引与启动的模板相关联,如果删除模板后索引的文档将通过属性遵守新规则,我不确定在哪里可以找到信息。
是的,完成后可以删除模板。但是为什么要删除它呢?索引模板可以留在那里并应用于基于 index_patterns
的索引,因此它不会影响任何其他索引架构。
" I am thinking to stop using templates moving forward and convert to
attributes in class using NEST"
我认为您不应该停止使用索引模板。更易于维护和定义分析器、同义词等
此外,索引模板仅在创建索引以定义架构时应用。这是 note from the documentation
Templates are only applied at index creation time. Changing a template
will have no impact on existing indices. When using the create index
API, the settings/mappings defined as part of the create index call
will take precedence over any matching settings/mappings defined in
the template.
我在弹性搜索中有一个索引,它是使用模板创建的。我正在考虑停止使用模板并使用 NEST 转换为 class 中的属性。
是否可以从服务器中删除模板并继续在同一索引中索引文档?
我知道索引与启动的模板相关联,如果删除模板后索引的文档将通过属性遵守新规则,我不确定在哪里可以找到信息。
是的,完成后可以删除模板。但是为什么要删除它呢?索引模板可以留在那里并应用于基于 index_patterns
的索引,因此它不会影响任何其他索引架构。
" I am thinking to stop using templates moving forward and convert to attributes in class using NEST"
我认为您不应该停止使用索引模板。更易于维护和定义分析器、同义词等
此外,索引模板仅在创建索引以定义架构时应用。这是 note from the documentation
Templates are only applied at index creation time. Changing a template will have no impact on existing indices. When using the create index API, the settings/mappings defined as part of the create index call will take precedence over any matching settings/mappings defined in the template.