ElasticSearch query filter statement

database is the index name, table is the type name

Elasticsearch recommends filtering first and then querying, as in the following statement.

"Filter" stands for filtering and supports multi-condition filtering, "trems" stands for union filtering, and "trems" stands for intersection filtering.

"Must" stands for matching, and multiple conditions are not supported.

GET database/table/_search{
	"query":{
		"bool":{
			"filter":[
				{
					"trems":{
						"属性":{
							["value","value"]
						}
					}
				}
				,{
					"trem":{
						"属性":"VALUE"
					}
				},
				{
					"trem":{
						"属性":"VALUE"
					}
				}
			]
			,"must":[{
				"match":{
					"id":"6"
				}
			}]
		}
	}
}

May your heart be like flowers and trees

Guess you like

Origin blog.csdn.net/nbcsdn/article/details/104262519