问significant_text有什么特点 答 问significant_text如何使用 答
# 删除DELETE /significant_text_test# 映射PUT /significant_text_test{"mappings": {"properties": {"name": {"type": "text"},"filter_type": {"type": "keyword"}}}}# 索引POST /significant_text_test/_bulk?routing10{"query": {"match": {"name": "hello"}}, "aggs": {"key_name_aggs": {"significant_text": {"field": "name","min_doc_count": 4, "filter_duplicate_text": true, "background_filter": {"term": {"filter_type": "t1"}}}}}}# 结果{"took" : 2,"timed_out" : false,"_shards" : {"total" : 1,"successful" : 1,"skipped" : 0,"failed" : 0},"hits" : {"total" : {"value" : 6,"relation" : "eq"},"max_score" : null,"hits" : [ ]},"aggregations" : {"key_name_aggs" : {"doc_count" : 6,"bg_count" : 5,"buckets" : [{"key" : "hello","doc_count" : 6,"score" : 0.24999999999999994,"bg_count" : 4},{"key" : "good","doc_count" : 5,"score" : 0.03472222222222222,"bg_count" : 4}]}}}