SOLR查询返回值,但仍然缺少stats.countDistinct

时间:2018-11-23 02:56:20

标签: solr count statistics distinct

这是我的Solr查询,结果返回了一些值,但不能计算出不同的值:

"stats.field":"deviceId"
"numFound":38
"deviceId":"11004084101MTVCN240D63C00010"
"missing":38
"distinctValues":[]

这是完整的答复:

{
  "responseHeader": {
    "status": 0,
    "QTime": 0,
    "params": {
      "q": "*:*",
      "stats.calcdistinct": "true",
      "indent": "on",
      "stats": "on",
      "start": "0",
      "fq": [
        "creationTime:[\"2018-10-19\" TO \"2018-10-19 23:59:59\"]",
        "tenant:mailink.MKH13.KVMB.DXHN1"
      ],
      "rows": "1",
      "wt": "json",
      "stats.field": "deviceId"
    }
  },
  "response": {
    "numFound": 38,
    "start": 0,
    "docs": [
      {
        "creationTime": "2018-10-19 21:13:55",
        "deviceId": "11004084101MTVCN240D63C00010",
        "tenant": "mailink.MKH13.KVMB.DXHN1",
        "status": 0,
        "id": "685b041f-91af-424f-9e9d-b06db9fbcd94",
        "_version_": 1614767301005934600
      }
    ]
  },
  "stats": {
    "stats_fields": {
      "deviceId": {
        "min": null,
        "max": null,
        "count": 0,
        "missing": 38,
        "distinctValues": [],
        "countDistinct": 0
      }
    }
  }
}

感谢您的帮助:)谢谢!

0 个答案:

没有答案