{"id":689,"date":"2024-09-10T11:07:01","date_gmt":"2024-09-10T03:07:01","guid":{"rendered":"https:\/\/china-abc.leohe.net.cn\/?p=689"},"modified":"2024-12-20T11:33:53","modified_gmt":"2024-12-20T03:33:53","slug":"es%e6%b7%bb%e5%8a%a0%e6%96%b0%e5%ad%97%e6%ae%b5%e5%b9%b6%e6%9b%b4%e6%96%b0%e5%8e%86%e5%8f%b2%e6%95%b0%e6%8d%ae%e7%9a%84%e9%bb%98%e8%ae%a4%e5%80%bc","status":"publish","type":"post","link":"https:\/\/china-abc.leohe.net.cn\/?p=689","title":{"rendered":"es\u6dfb\u52a0\u65b0\u5b57\u6bb5\u5e76\u66f4\u65b0\u5386\u53f2\u6570\u636e\u7684\u9ed8\u8ba4\u503c"},"content":{"rendered":"<p>PUT \/es_student_brands\/_mapping<br \/>\n{<br \/>\n\"properties\": {<br \/>\n\"is_auth\": {<br \/>\n\"type\": \"byte\"<br \/>\n},<br \/>\n\"auth_time\": {<br \/>\n\"type\": \"date\",<br \/>\n\"format\": \"yyyy-MM-dd HH:mm:ss\"<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/ \u66f4\u65b0\u5386\u53f2\u503c\u4e3a2<\/p>\n<p>POST es_student_brands\/_update_by_query?<span style=\"color: #ff0000;\">conflicts=proceed&amp;wait_for_completion=false<\/span><br \/>\n{<br \/>\n\"script\": {<br \/>\n\"lang\": \"painless\",<br \/>\n\"inline\": \"if (ctx._source.is_auth== null) {ctx._source.is_auth= '2'}\"<br \/>\n}<br \/>\n}<\/p>\n<p>\/\/\u66f4\u65b0\u5386\u53f2\u503c\u4e3anull<\/p>\n<p>POST \/es_student_brands\/_update_by_query?conflicts=proceed&amp;wait_for_completion=false<br \/>\n{<br \/>\n\"script\": {<br \/>\n\"source\": \"ctx._source['auth_time'] = null\",<br \/>\n\"lang\": \"painless\"<br \/>\n},<br \/>\n\"query\": {<br \/>\n\"match_all\": {}<br \/>\n}<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<div>\n<div># \u66f4\u65b0es_student_brands\u4e2dstudent_id\u4e3a1,2,3\u7684release_status\u4e3a\u8d4b\u503c\u4e3a1<\/div>\n<div>POST es_student_brands\/_update_by_query<\/div>\n<div>{<\/div>\n<div>\"conflicts\": \"proceed\",<\/div>\n<div>\"query\": {<\/div>\n<div>\"terms\": {<\/div>\n<div>\"student_id\": [1, 2, 3]<\/div>\n<div>}<\/div>\n<div>},<\/div>\n<div>\"script\": {<\/div>\n<div>\"source\": \"ctx._source.release_status = 1\",<\/div>\n<div>\"lang\": \"painless\"<\/div>\n<div>}<\/div>\n<div>}<\/div>\n<div># \u6dfb\u52a0student_number\u5b57\u6bb5<\/div>\n<div>PUT \/es_student_brands\/_mapping<\/div>\n<div>{<\/div>\n<div>\"properties\": {<\/div>\n<div>\"student_number\": {<\/div>\n<div>\"type\": \"keyword\"<\/div>\n<div>}<\/div>\n<div>}<\/div>\n<div>}<\/div>\n<div># \u67e5\u8be2\u6240\u6709task\u4efb\u52a1<\/div>\n<div>GET \/_tasks\/<\/div>\n<div># \u67e5\u8be2task_id\u4e3a1hV5QM34RqGoOvkFTgut4A:3571322322\u7684\u4efb\u52a1<\/div>\n<div>GET \/_tasks\/1hV5QM34RqGoOvkFTgut4A:3571322322<\/div>\n<div># \u53d6\u6d88task_id\u4e3aMVsKnLbQTPC8XVDHZZdSdg:1649293657<\/div>\n<div>POST _tasks\/MVsKnLbQTPC8XVDHZZdSdg:1649293657\/_cancel<\/div>\n<div># \u67e5\u8be2es_student_brands\u4e2drelease_status\u4e3anull\u7684student_id\u5b57\u6bb5\u4fe1\u606f<\/div>\n<div>POST es_student_brands\/_search<\/div>\n<div>{<\/div>\n<div>\"query\": {<\/div>\n<div>\"bool\": {<\/div>\n<div>\"must_not\": [<\/div>\n<div>{<\/div>\n<div>\"exists\": { \"field\": \"release_status\" }<\/div>\n<div>}<\/div>\n<div>]<\/div>\n<div>}<\/div>\n<div>},<\/div>\n<div>\"_source\": [\"student_id\"],<\/div>\n<div>\"size\": 10000<\/div>\n<div>}<\/div>\n<div># \u67e5\u8be2es_student_brands\u4e2drelease_status\u4e3anull\u7684\u8bb0\u5f55\u6570<\/div>\n<div>POST es_student_brands\/_search<\/div>\n<div>{<\/div>\n<div>\"query\": {<\/div>\n<div>\"bool\": {<\/div>\n<div>\"must_not\": [<\/div>\n<div>{<\/div>\n<div>\"exists\": { \"field\": \"release_status\" }<\/div>\n<div>}<\/div>\n<div>]<\/div>\n<div>}<\/div>\n<div>},<\/div>\n<div>\"size\": 0<\/div>\n<div>}<\/div>\n<div># \u66f4\u65b0es_student_brands\u7d22\u5f15\u91cc\u5c06release_status\u4e3anull\u7684\u503c\u8d4b\u503c\u4e3a1<\/div>\n<div>POST es_student_brands\/_update_by_query?conflicts=proceed&amp;wait_for_completion=false<\/div>\n<div>{<\/div>\n<div>\"script\": {<\/div>\n<div>\"lang\": \"painless\",<\/div>\n<div>\"inline\": \"if (ctx._source.release_status== null) {ctx._source.release_status='1'}\"<\/div>\n<div>}<\/div>\n<div>}<\/div>\n<div># \u67e5\u8be2\u6307\u5b9aid\u5b66\u5458\u4fe1\u606f<\/div>\n<div>GET es_student_brands\/_search<\/div>\n<div>{<\/div>\n<div>\"_source\": [\"id\", \"release_status\",\"c_user_id\", \"name\", \"phone\", \"sex\", \"age\", \"wechat\", \"qq\", \"email\", \"student_id\", \"owner_id\", \"promoter_id\", \"locking_id\", \"intention_id\", \"org_id\", \"org_dept_id\", \"province_id\", \"city_id\", \"district_id\", \"education_id\", \"remark\", \"channel_id\", \"project_id\", \"major_id\", \"subject_id\", \"is_new\", \"communicate_num\", \"is_active\", \"is_activation\", \"is_deal\", \"is_trigger\", \"is_invalid\", \"invalid_reason_id\", \"invalid_time\", \"lock_num\", \"receive_num\", \"is_common\", \"is_cache\", \"is_export\", \"protection_period\", \"valid_period\", \"next_contact_time\", \"last_distribution_time\", \"enterprise_id\", \"created_at\", \"created_by\", \"promoter_dept_id\", \"call_num\", \"inviter_id\", \"inviter_org_id\", \"activity_student_id\", \"exam_count\", \"job_direction\", \"job_direction_info\", \"job_department\", \"job_department_info\"],<\/div>\n<div>\"from\": 0,<\/div>\n<div>\"query\": {<\/div>\n<div>\"bool\": {<\/div>\n<div>\"must\": [{<\/div>\n<div>\"term\": {<\/div>\n<div>\"student_id\": 418442105359239941<\/div>\n<div>}<\/div>\n<div>}, {<\/div>\n<div>\"term\": {<\/div>\n<div>\"deleted_by\": 0<\/div>\n<div>}<\/div>\n<div>}, {<\/div>\n<div>\"bool\": {<\/div>\n<div>\"should\": [{<\/div>\n<div>\"match\": {<\/div>\n<div>\"enterprise_id\": 0<\/div>\n<div>}<\/div>\n<div>}, {<\/div>\n<div>\"range\": {<\/div>\n<div>\"protection_period\": {<\/div>\n<div>\"format\": \"yyyy-MM-dd HH:mm:ss\",<\/div>\n<div>\"lte\": \"2023-12-05 19:50:39\"<\/div>\n<div>}<\/div>\n<div>}<\/div>\n<div>}]<\/div>\n<div>}<\/div>\n<div>}],<\/div>\n<div>\"must_not\": [{<\/div>\n<div>\"exists\": {<\/div>\n<div>\"field\": \"deleted_at\"<\/div>\n<div>}<\/div>\n<div>}]<\/div>\n<div>}<\/div>\n<div>},<\/div>\n<div>\"size\": 10,<\/div>\n<div>\"sort\": {<\/div>\n<div>\"id\": {<\/div>\n<div>\"order\": \"desc\"<\/div>\n<div>}<\/div>\n<div>}<\/div>\n<div>}<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>PUT \/es_student_brands\/_mapping { \"properties\": { \"is_a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[],"_links":{"self":[{"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/689"}],"collection":[{"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=689"}],"version-history":[{"count":3,"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/689\/revisions"}],"predecessor-version":[{"id":708,"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=\/wp\/v2\/posts\/689\/revisions\/708"}],"wp:attachment":[{"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/china-abc.leohe.net.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}