--- title: "时间序列索引仅支持合成源 – 如何解决此 Elasticsearch 异常" date: 2026-02-10 lastmod: 2026-02-10 description: "当尝试在 Elasticsearch 的时间序列索引中使用非合成源时,会触发此错误。时间序列索引设计为仅与合成源一起使用。" tags: ["时间序列索引", "合成源", "索引模式", "映射解析异常"] summary: " 版本: 8.9-8.9 简而言之,当您尝试在 Elasticsearch 的时间序列索引中使用非合成源时,会发生此错误。时间序列索引设计为仅与合成源一起使用。要解决此问题,您可以切换到使用合成源,或使用支持非合成源的不同类型的索引。或者,您可以修改数据或查询以符合合成源的要求。 日志上下文 # 日志"Time series indices only support synthetic source"的类名是 SourceFieldMapper.java. 我们从 Elasticsearch 源代码中提取了以下内容,供寻求深入上下文的人员参考: @Override public SourceFieldMapper build() { if (enabled.getValue().explicit() && mode.get() != null) { if (indexMode == IndexMode.TIME_SERIES) { throw new MapperParsingException("Time series indices only support synthetic source"); } else { throw new MapperParsingException("Cannot set both [mode] and [enabled] parameters"); } } if (isDefault()) { " --- > **版本:** 8.9-8.9 简而言之,当您尝试在 Elasticsearch 的时间序列索引中使用非合成源时,会发生此错误。时间序列索引设计为仅与合成源一起使用。要解决此问题,您可以切换到使用合成源,或使用支持非合成源的不同类型的索引。或者,您可以修改数据或查询以符合合成源的要求。 日志上下文 ----------- 日志"Time series indices only support synthetic source"的类名是 [SourceFieldMapper.java.](https://www.geeksforgeeks.org/java-lang-class-class-java-set-1/) 我们从 Elasticsearch 源代码中提取了以下内容,供寻求深入上下文的人员参考: ```java @Override public SourceFieldMapper build() { if (enabled.getValue().explicit() && mode.get() != null) { if (indexMode == IndexMode.TIME_SERIES) { throw new MapperParsingException("Time series indices only support synthetic source"); } else { throw new MapperParsingException("Cannot set both [mode] and [enabled] parameters"); } } if (isDefault()) { ```