elasticsearch Elasticsearch:一个文档中总术语频率的总和,elasticsearch,lucene,elasticsearch,Lucene" /> elasticsearch Elasticsearch:一个文档中总术语频率的总和,elasticsearch,lucene,elasticsearch,Lucene" />

elasticsearch Elasticsearch:一个文档中总术语频率的总和

elasticsearch Elasticsearch:一个文档中总术语频率的总和,elasticsearch,lucene,elasticsearch,Lucene,我需要一个字段中一个文档的sumttf。然而,我只能得到所有文件的摘要。。。 我需要能够访问脚本中的变量,比如特定文档的_index['field'].sumttf。这就是我到目前为止得到的 映射: {"document2" : { "mappings" : { "document2" : { "_all" : { "enabled" : false }, "properties" : { "content" : {

我需要一个字段中一个文档的sumttf。然而,我只能得到所有文件的摘要。。。 我需要能够访问脚本中的变量,比如特定文档的_index['field'].sumttf。这就是我到目前为止得到的

映射:

{"document2" : {
  "mappings" : {
    "document2" : {
      "_all" : {
        "enabled" : false
      },
      "properties" : {
        "content" : {
          "type" : "string",
          "term_vector" : "yes",
          "fields" : {
            "with_shingles" : {
              "type" : "string",
              "analyzer" : "my_shingle_analyzer"
            }
          }
        },
        ...
术语向量:

"_index" : "document2",
"_type" : "document2",
"_id" : "709718",
"_version" : 1,
"term_vectors" : {
    "content" : {
      "field_statistics" : {
        "sum_doc_freq" : 60676474,
        "doc_count" : 198373,
        "sum_ttf" : 224960172
      },
      terms" : {
        "0" : {
          "term_freq" : 8
        },
        "0.5" : {
          "term_freq" : 1
        },
        "003a0e45ea07a" : {
          "term_freq" : 1
        },
        "005" : {
          "term_freq" : 1
        },
        "0081989" : {
          "term_freq" : 1
        },
        "01" : {
          "term_freq" : 1
        },
        "01.08.2002" : {
          "term_freq" : 1
        },
        ...