elasticsearch 查询格式整理

GET some_index/_search
{
	"query" : {
		"term": {
			"field_name": "value"
		},
		"terms": {
			"field_name": ["value1", "value2"]
		}
		"match": {
			"field_name": "value"
		},
		"multi_match": {
			"fields": ["field1", "field2"],
			"query": "value"
		},
		"match_all": {},
		"match_phrase": {
			"field_name": "搜索连续的字符串字符"
		},
		"match_phrase_prefix": {
			"field_name": "前缀"
		},
		"fuzzy": {
			"field_name": "xxx"
		},
		"wildcard": {
			"field_name": "*feji?"
		},
		"range": {
			"field_name": {
				"lt": 12,
				"gt": 9
			}
		}
		"bool": {
			"must": [
			],
			"must_not": [
			],
			"should": [
			],
			"filter": [
			]
		}
	},
	"_source": {
		"include": [],
		"exclude": []
	},
	"post_filter": {

	},
	"aggs": {
		"some_aggregation_name": {
			""
		}
	},
	"sort": {
		"field_name": {
			"order": "asc"
		}
	},
	"from": 0,
	"size": 100
}

发表评论

电子邮件地址不会被公开。 必填项已用*标注

大数据唯一值总数估计——HyperLogLog 算法
Previous post
使用 satis 搭建私有 composer 库,加速 PHP 测试部署
Next post