【问题标题】:Elasticsearch document count doesn't reflect higher indexing rateElasticsearch 文档计数不反映更高的索引率
【发布时间】:2020-02-12 22:05:11
【问题描述】:

当我们通过 kibana 监控我们的 elasticsearch 集群运行状况时,对于特定索引,我们会看到非常高的索引率。但似乎文件数量并没有按比例增加。如何解决这两个问题。

示例文档

{ "_index": "finance_report_fgl_reporting_log", "_type": "fgl_reporting_logs", "_id": "1907688_POINTS_ACCOUNT_DEBIT", “_score”:9.445704, “_资源”: { "reportingLogId": { “journalId”:1907688, "postingAccountId": "POINTS_ACCOUNT", "postingAccountingEntry": "借方" }, “journalId”:1907688, "journalEventId": "trip_completed", “journalEventLogId”:“15db1f2b-b9d0-4edd-96f0-c4e4f8e68150”, "journalAccountingRuleId": "trip_completed_points_payment_rule", "journalReferenceId": "174558200", “期刊总金额”:154.11, “postingJournalId”:1907688, "postingAccountingRuleId": "trip_completed_points_payment_rule", "postingReferenceId": "174558200", "postingAccountId": "POINTS_ACCOUNT", "postingAccountingPeriod": "2019_08", "postingAccountingEntry": "借方", "postingCurrencyTypeId": "积分", “过帐金额”:154.11, "accountId": "POINTS_ACCOUNT", "accountStakeholderId": "操作员", "accountCurrencyTypeId": "积分", "accountTypeId": "控制器", "accountingRuleId": "trip_completed_points_payment_rule", "accountingRuleDescription": "积分支付", "eventId": "trip_completed", "eventReferenceParam": "body.trip.id", "createdDate": "2019-08-29T10:03:32.000+0530", "修改日期": "2019-08-29T10:03:32.000+0530", “createdBy”:“引擎”, “modifiedBy”:“引擎”, “版本”:“3.12.6”, “创建年份”:2019 年, “routingKey”:“_2019” } },

【问题讨论】:

  • 可能是同一文档有很多更新。或者您的刷新间隔设置得非常高。可能吗?
  • 这个索引率是写入索引的实际文档数
  • 每秒运行的索引操作数
  • 而我的刷新间隔是10s
  • 您能否详细说明您正在索引什么以及如何(与哪个客户端)?

标签: elasticsearch indexing document


【解决方案1】:

这通常发生的原因是您的索引操作不会创建新文档,而是更新现有文档。主要是因为您正在向已经存在的 ID 发送更新。

每隔几个小时,就会创建一批新文档(根据图表中的跳转),因为您正在创建一组新的 ID。

确保验证您是如何创建 ID 的,因为解决方案隐藏在某处。

【讨论】:

    【解决方案2】:

    您在执行GET _cat/indices?v 时可能会得到一些信息,请查看“docs.deleted”列,因为更新操作只是“创建新的+删除旧的”操作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-09-16
      • 1970-01-01
      • 1970-01-01
      • 2017-03-11
      • 2017-02-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多