Commit 8d6f0e8f authored by litaolemo's avatar litaolemo

update

parent 2fc9447c
...@@ -420,7 +420,7 @@ class QuickstartUser(HttpUser): ...@@ -420,7 +420,7 @@ class QuickstartUser(HttpUser):
"should": [ "should": [
{ {
"multi_match": { "multi_match": {
"query": "{query}", "query": {query},
"type": "cross_fields", "type": "cross_fields",
"operator": "and", "operator": "and",
"fields": [ "fields": [
...@@ -440,7 +440,7 @@ class QuickstartUser(HttpUser): ...@@ -440,7 +440,7 @@ class QuickstartUser(HttpUser):
"path": "sku_list", "path": "sku_list",
"query": { "query": {
"multi_match": { "multi_match": {
"query": "{query}", "query": {query},
"fields": [ "fields": [
"sku_list.name^2", "sku_list.name^2",
"sku_list.new_sku_tags", "sku_list.new_sku_tags",
...@@ -492,7 +492,7 @@ class QuickstartUser(HttpUser): ...@@ -492,7 +492,7 @@ class QuickstartUser(HttpUser):
"constant_score": { "constant_score": {
"filter": { "filter": {
"multi_match": { "multi_match": {
"query": "{query}", "query": {query},
"fields": [ "fields": [
"sku_list.name", "sku_list.name",
"sku_list.new_sku_tags", "sku_list.new_sku_tags",
...@@ -513,7 +513,7 @@ class QuickstartUser(HttpUser): ...@@ -513,7 +513,7 @@ class QuickstartUser(HttpUser):
{ {
"match": { "match": {
"sku_list.new_sku_name": { "sku_list.new_sku_name": {
"query": "{query}", "query": {query},
"analyzer": "gm_default_search", "analyzer": "gm_default_search",
"operator": "or" "operator": "or"
} }
...@@ -587,7 +587,7 @@ class QuickstartUser(HttpUser): ...@@ -587,7 +587,7 @@ class QuickstartUser(HttpUser):
"path": "sku_list", "path": "sku_list",
"query": { "query": {
"multi_match": { "multi_match": {
"query": "{query}", "query": {query},
"fields": [ "fields": [
"sku_list.sku_tags", "sku_list.sku_tags",
"sku_list.show_name", "sku_list.show_name",
...@@ -607,7 +607,7 @@ class QuickstartUser(HttpUser): ...@@ -607,7 +607,7 @@ class QuickstartUser(HttpUser):
"match_phrase": { "match_phrase": {
"short_description_by_standard_analyzer": { "short_description_by_standard_analyzer": {
"analyzer": "standard", "analyzer": "standard",
"query": "{query}" "query": {query}
} }
} }
}, },
...@@ -618,7 +618,7 @@ class QuickstartUser(HttpUser): ...@@ -618,7 +618,7 @@ class QuickstartUser(HttpUser):
"match_phrase": { "match_phrase": {
"doctor.name_by_standard_analyzer": { "doctor.name_by_standard_analyzer": {
"analyzer": "standard", "analyzer": "standard",
"query": "{query}" "query": {query}
} }
} }
}, },
...@@ -629,7 +629,7 @@ class QuickstartUser(HttpUser): ...@@ -629,7 +629,7 @@ class QuickstartUser(HttpUser):
"match_phrase": { "match_phrase": {
"doctor.hospital.name_by_standard_analyzer": { "doctor.hospital.name_by_standard_analyzer": {
"analyzer": "standard", "analyzer": "standard",
"query": "{query}" "query": {query}
} }
} }
}, },
...@@ -640,7 +640,7 @@ class QuickstartUser(HttpUser): ...@@ -640,7 +640,7 @@ class QuickstartUser(HttpUser):
"match_phrase": { "match_phrase": {
"doctor.hospital.city_name_by_standard_analyzer": { "doctor.hospital.city_name_by_standard_analyzer": {
"analyzer": "standard", "analyzer": "standard",
"query": "{query}" "query": {query}
} }
} }
}, },
...@@ -651,7 +651,7 @@ class QuickstartUser(HttpUser): ...@@ -651,7 +651,7 @@ class QuickstartUser(HttpUser):
"match_phrase": { "match_phrase": {
"doctor.hospital.city_province_name_by_standard_analyzer": { "doctor.hospital.city_province_name_by_standard_analyzer": {
"analyzer": "standard", "analyzer": "standard",
"query": "{query}" "query": {query}
} }
} }
}, },
...@@ -662,7 +662,7 @@ class QuickstartUser(HttpUser): ...@@ -662,7 +662,7 @@ class QuickstartUser(HttpUser):
"match_phrase": { "match_phrase": {
"bak_closure_tags_by_standard_analyzer": { "bak_closure_tags_by_standard_analyzer": {
"analyzer": "standard", "analyzer": "standard",
"query": "{query}" "query": {query}
} }
} }
}, },
...@@ -673,7 +673,7 @@ class QuickstartUser(HttpUser): ...@@ -673,7 +673,7 @@ class QuickstartUser(HttpUser):
"match_phrase": { "match_phrase": {
"doctor.hospital.officer_name_by_standard_analyzer": { "doctor.hospital.officer_name_by_standard_analyzer": {
"analyzer": "standard", "analyzer": "standard",
"query": "{query}" "query": {query}
} }
} }
}, },
...@@ -686,7 +686,7 @@ class QuickstartUser(HttpUser): ...@@ -686,7 +686,7 @@ class QuickstartUser(HttpUser):
"query": { "query": {
"match_phrase": { "match_phrase": {
"sku_list.name_by_standard_analyzer": { "sku_list.name_by_standard_analyzer": {
"query": "{query}", "query": {query},
"analyzer": "standard" "analyzer": "standard"
} }
} }
...@@ -698,7 +698,7 @@ class QuickstartUser(HttpUser): ...@@ -698,7 +698,7 @@ class QuickstartUser(HttpUser):
{ {
"filter": { "filter": {
"term": { "term": {
"short_description": "{query}" "short_description": {query}
} }
}, },
"weight": 1000 "weight": 1000
...@@ -706,7 +706,7 @@ class QuickstartUser(HttpUser): ...@@ -706,7 +706,7 @@ class QuickstartUser(HttpUser):
{ {
"filter": { "filter": {
"term": { "term": {
"doctor.name": "{query}" "doctor.name": {query}
} }
}, },
"weight": 1000 "weight": 1000
...@@ -714,7 +714,7 @@ class QuickstartUser(HttpUser): ...@@ -714,7 +714,7 @@ class QuickstartUser(HttpUser):
{ {
"filter": { "filter": {
"term": { "term": {
"doctor.hospital.name": "{query}" "doctor.hospital.name": {query}
} }
}, },
"weight": 1000 "weight": 1000
...@@ -722,7 +722,7 @@ class QuickstartUser(HttpUser): ...@@ -722,7 +722,7 @@ class QuickstartUser(HttpUser):
{ {
"filter": { "filter": {
"term": { "term": {
"doctor.hospital.city_name": "{query}" "doctor.hospital.city_name": {query}
} }
}, },
"weight": 1000 "weight": 1000
...@@ -730,7 +730,7 @@ class QuickstartUser(HttpUser): ...@@ -730,7 +730,7 @@ class QuickstartUser(HttpUser):
{ {
"filter": { "filter": {
"term": { "term": {
"doctor.hospital.city_province_name": "{query}" "doctor.hospital.city_province_name": {query}
} }
}, },
"weight": 1000 "weight": 1000
...@@ -738,7 +738,7 @@ class QuickstartUser(HttpUser): ...@@ -738,7 +738,7 @@ class QuickstartUser(HttpUser):
{ {
"filter": { "filter": {
"term": { "term": {
"bak_closure_tags": "{query}" "bak_closure_tags": {query}
} }
}, },
"weight": 1000 "weight": 1000
...@@ -746,7 +746,7 @@ class QuickstartUser(HttpUser): ...@@ -746,7 +746,7 @@ class QuickstartUser(HttpUser):
{ {
"filter": { "filter": {
"term": { "term": {
"doctor.hospital.officer_name": "{query}" "doctor.hospital.officer_name": {query}
} }
}, },
"weight": 1000 "weight": 1000
...@@ -754,7 +754,7 @@ class QuickstartUser(HttpUser): ...@@ -754,7 +754,7 @@ class QuickstartUser(HttpUser):
{ {
"filter": { "filter": {
"term": { "term": {
"sku_list.name": "{query}" "sku_list.name": {query}
} }
}, },
"weight": 1000 "weight": 1000
...@@ -854,7 +854,7 @@ class QuickstartUser(HttpUser): ...@@ -854,7 +854,7 @@ class QuickstartUser(HttpUser):
"require_field_match": false "require_field_match": false
},"size":10 },"size":10
} }
""".replace("{query}",random.choice(json.dumps(query_Str_list))) """.replace({query},random.choice(json.dumps(query_Str_list)))
heasers = { heasers = {
"Content-Type": "application/json" "Content-Type": "application/json"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment