我需要一个字段中的一个文档的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
},
...