基于Term Vectors深入探查数据的情况
Term Vectors就是 获取document中的某个field内的各个term的统计信息,主要包含以下几个信息: term frequency in the field, term positions, start and end offsets, term payloads
设置term_statistics=true 后将返回:
- total term frequency, 一个term在所有document中出现的频率;
- document frequency,有多少document包含这个term
- document count: 有多少document包含这个field;
- sum of document frequency:一个field中所有term的df之和;
- sum of total term frequency:一个field中的所有term的tf之和
GET /my_index/my_type/_termvectors { "doc" : { "fullname" : "Leo Li", "text" : "hello test test test" }, "fields" : ["text"], "offsets" : true, "payloads" : true, "positions" : true, "term_statistics" : true, "field_statistics" : true, "filter" : { "max_num_terms" : 3, "min_term_freq" : 1, "min_doc_freq" : 1 } }
立志如山 静心求实
浙公网安备 33010602011771号