1、curl一般命令
1)GET:获取请求对象的当前状态。
2)POST:改变对象的当前状态。
3)PUT:创建一个对象。
4)DELETE:销毁对象。
5)HEAD:请求获取对象的基础信息。
2、实践
curl -XPUT 'localhost:9200/base_config_object/bco_school/838007_15?pretty' -d '{"yearIn":17,"sp_cs":{"line_b":0.75,"line_a":0.5},"sp_line":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"boxplot_line":{"line_a2":0.8,"line_b1":0.05,"line_b2":0.95,"line_a1":0.2},"waveStus":[{"rule":{"totalNumX":0.15},"sortId":3}],"rank_line":{"rl_qk":{"rl_yy":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_sx":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_dl":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_zz":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_ls":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_sw":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_hx":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_yw":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_wl":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_primix":{"line_c":0.6,"line_b":0.3,"line_a":0.1},"rl_mix":{"line_c":0.6,"line_b":0.3,"line_a":0.1}}},"score_seg_line":{"ss_qk":{"ss_ls":{"num":5,"span_score":10,"start_score":30.0},"ss_hx":{"num":5,"span_score":10,"start_score":30.0},"ss_wl":{"num":5,"span_score":10,"start_score":30.0},"ss_dl":{"num":5,"span_score":10,"start_score":30.0},"ss_sw":{"num":5,"span_score":10,"start_score":30.0},"ss_yy":{"num":5,"span_score":10,"start_score":30.0},"ss_primix":{"num":5,"span_score":30,"start_score":50.0},"ss_zz":{"num":5,"span_score":10,"start_score":30.0},"ss_yw":{"num":5,"span_score":10,"start_score":30.0},"ss_sx":{"num":5,"span_score":10,"start_score":30.0},"ss_mix":{"num":5,"span_score":30,"start_score":50.0}}},"score_line":{"sl_wl":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_dl":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_hx":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_zz":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_ls":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_yw":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_primix":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_sw":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_yy":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_sx":{"line_c":0.6,"line_b":0.75,"line_a":0.9},"sl_mix":{"line_c":0.6,"line_b":0.75,"line_a":0.9}},"on_line":{"ol_base_num_type":1,"ol_qk":{"ol_sw":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_sx":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_dl":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_hx":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_ls":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_wl":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_primix":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_yy":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_zz":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_yw":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}],"ol_mix":[{"line_name":"前160名","line_std":160.0,"line_up":39.0,"line_type":1,"line_down":-1.0},{"line_name":"前60名","line_std":60.0,"line_up":-1.0,"line_type":1,"line_down":-1.0},{"line_name":"前120名","line_std":120.0,"line_up":-1.0,"line_type":1,"line_down":-1.0}]}},"schId":838007,"key_lines":[{"line_name":"重点线","kl_qk":{"kl_sw":{"line_std":0.7,"line_type":1},"kl_zz":{"line_std":0.7,"line_type":1},"kl_sx":{"line_std":0.7,"line_type":1},"kl_dl":{"line_std":0.7,"line_type":1},"kl_mix":{"line_std":0.7,"line_type":1},"kl_ls":{"line_std":0.7,"line_type":1},"kl_hx":{"line_std":0.7,"line_type":1},"kl_yw":{"line_std":0.7,"line_type":1},"kl_primix":{"line_std":0.7,"line_type":1},"kl_wl":{"line_std":0.7,"line_type":1},"kl_yy":{"line_std":0.7,"line_type":1}}}],"line_p":0.6,"lastStu":{"ls_qk":0.15},"emd":{"line_e":0.8,"line_m":0.4}}'
curl -XGET 'http://localhost:9200/base_config_object/bco_school/838007_17?pretty'
curl -XDELETE 'http://localhost:9200/base_config_object/bco_school/838007_17?pretty'
curl -XPOST 'http://localhost:9200/base_config_object/bco_school/学校代码_年级/_update?pretty' -d '{
“doc” : 策略
}