1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
| GET new_ques_all_profile/_search { "size" : 20, "timeout" : "5s", "query" : { "bool" : { "must" : [ { "function_score" : { "query" : { "bool" : { "must" : [ { "multi_match" : { "query" : "用电场线能很直观", "fields" : [ "bodys^1.0", "point_names^1.0" ], "type" : "best_fields", "max_expansions" : 50, "minimum_should_match" : "50%", "tie_breaker" : 0.9 } } ] } }, "functions" : [ { "filter" : { "match_all" : { "boost" : 1.0 } }, "script_score" : { "script" : { "inline" : "double area = 0.0; if (params.c_id == doc['city_id'].value){area = 1;} if (params.c_id != doc['city_id'].value && params.p_id == doc['province_id'].value){area = 0.5;} Math.log(2+(doc['year_value'].value+ area +doc['use_value'].value))/Math.log(10)", "lang" : "painless", "params" : { "c_id" : null, "p_id" : null } } } } ] } } ], "filter" : [ { "range" : { "type" : { "from" : null, "to" : 7, "include_lower" : true, "include_upper" : false, "boost" : 1.0 } } } ] } }, "_source" : { "includes" : [ "question_id", "right_rate", "difficult", "cttdiff", "use_count", "collect_count", "paper_type_id", "exam_type", "year", "sizhong_type", "type", "province_names" ], "excludes" : [ ] } }
|