Getting total term frequency throughout entire index (Elasticsearch)

前端 未结 3 779
星月不相逢
星月不相逢 2021-02-05 13:25

I am trying to calculate the total number of times a particular term occurs throughout an entire index (term collection frequency). I have attempted to do so through the use of

3条回答
  •  遇见更好的自我
    2021-02-05 14:02

    I believe you need to turn term_statistics to true as per elasticsearch documentation:

    Term statistics Setting term_statistics to true (default is false) will return

    total term frequency (how often a term occurs in all documents)

    document frequency (the number of documents containing the current term)

    By default these values are not returned since term statistics can have a serious performance impact.

提交回复
热议问题