查询学习
1.查询json学习
{
"bool": {
"must": [
{
"term": {
"yn": {
"value": 1,
"boost": 1 # 权重是1
}
}
},
{
"terms": {
"ware_info_id": [
"lw_770_421",
"lw_770_979",
"lw_4_589",
"lw_650_927",
"666",
"lw_3_106",
"lw_3_238",
"lw_3_429",
"lw_3_365",
"lw_3_270",
"lw_3_350",
"lw_3_744",
"lw_3_267",
"lw_3_725",
"lw_3_420",
"lw_4_992",
"lw_4_327",
"lw_4_204",
"lw_4_975",
"lw_4_915",
"lw_4_797",
"lw_688_333",
"lw_688_875",
"lw_688_122",
"lw_688_205",
"lw_611_581",
"lw_611_414",
"lw_611_617",
"lw_611_229",
"lw_600_35",
"lw_600_606",
"lw_600_255",
"lw_600_197",
"lw_600_61",
"lw_600_891",
"lw_6_950",
"lw_6_49",
"lw_6_531",
"lw_6_611",
"lw_6_312",
"lw_6_488",
"lw_6_790",
"lw_6_834",
"lw_6_76",
"lw_6_127",
"lw_6_751",
"lw_6_2",
"lw_6_848",
"lw_766_916",
"lw_645_991",
"lw_645_800",
"lw_645_897",
"lw_645_988",
"lw_723_750",
"lw_723_767",
"lw_723_716",
"lw_723_204",
"lw_735_275",
"lw_769_698",
"lw_769_396",
"888",
"lw_10_861",
"lw_10_334",
"lw_10_815",
"lw_10_631",
"lw_10_870",
"lw_10_408",
"lw_10_993",
"lw_10_834",
"lw_10_266",
"lw_10_893"
],
"boost": 1
}
},
{
"terms": {
"ticket_status": [
3
],
"boost": 1
}
},
{
"exists": {
"field": "appeal_time", # exists代表这个字段appeal_time字段有值的数据进行匹配,类比appeal_time != null
"boost": 1
}
},
{
"range": {
"appeal_time": {
"from": null,
"to": 1650297600871,
"include_lower": true,
"include_upper": true,
"boost": 1
}
}
}
],
"adjust_pure_negative": true,
"boost": 1
}
}
原创:做时间的朋友