Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ```
- # NO STORE_CTR QUERY
- GET consumer_search_index_v6/_search
- {
- "profile": true,
- "query": {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "1",
- "must": [
- {
- "dis_max": {
- "tie_breaker": 0.3,
- "boost": 1.0,
- "queries": [
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "business_tags^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "item_name^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_categories^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 10,
- "fields": [
- "store_name_ngram^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "25%",
- "max_expansions": 50,
- "boost": 0.8
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_name_phonetic^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "25%",
- "max_expansions": 50,
- "boost": 1.0
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_name_standard^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 3.0
- }
- }
- ]
- }
- }
- ],
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "filter": [
- {
- "term": {
- "item_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must": [
- {
- "has_parent": {
- "query": {
- "bool": {
- "filter": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "must": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "2",
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_radius_circle",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "store_max_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "boost": 1.0,
- "ignore_unmapped": false
- }
- },
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_polygon",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "boost": 1.0,
- "store_max_delivery_polygon": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- }
- ]
- }
- },
- {
- "term": {
- "store_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- },
- {
- "terms": {
- "boost": 1.0,
- "store_starting_point": [
- 9,
- 70,
- 82,
- 96,
- 453,
- 5062
- ]
- }
- }
- ],
- "boost": 1.0,
- "must_not": [
- {
- "term": {
- "store_is_test": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "should": [
- {
- "geo_shape": {
- "boost": 1.0,
- "store_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- },
- {
- "geo_distance": {
- "distance": 4400.0,
- "ignore_unmapped": false,
- "distance_type": "arc",
- "store_location": [
- -122.4084229,
- 37.7837394
- ],
- "validation_method": "STRICT",
- "boost": 1.0
- }
- }
- ]
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0
- }
- },
- "score": true,
- "boost": 1.0,
- "ignore_unmapped": false,
- "parent_type": "store"
- }
- }
- ]
- }
- },
- {
- "bool": {
- "filter": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "must": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "2",
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_radius_circle",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "store_max_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "boost": 1.0,
- "ignore_unmapped": false
- }
- },
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_polygon",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "boost": 1.0,
- "store_max_delivery_polygon": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- }
- ]
- }
- },
- {
- "term": {
- "store_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- },
- {
- "terms": {
- "boost": 1.0,
- "store_starting_point": [
- 9,
- 70,
- 82,
- 96,
- 453,
- 5062
- ]
- }
- }
- ],
- "boost": 1.0,
- "must_not": [
- {
- "term": {
- "store_is_test": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "should": [
- {
- "geo_shape": {
- "boost": 1.0,
- "store_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- },
- {
- "geo_distance": {
- "distance": 4400.0,
- "ignore_unmapped": false,
- "distance_type": "arc",
- "store_location": [
- -122.4084229,
- 37.7837394
- ],
- "validation_method": "STRICT",
- "boost": 1.0
- }
- }
- ]
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0
- }
- }
- ]
- }
- },
- "min_score": 2.0,
- "from": 0,
- "size": 650
- }
- # OLD QUERY
- GET consumer_search_index_v6/_search
- {
- "profile": true,
- "query": {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "1",
- "must": [
- {
- "dis_max": {
- "tie_breaker": 0.3,
- "boost": 1.0,
- "queries": [
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "business_tags^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "item_name^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_categories^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 10,
- "fields": [
- "store_name_ngram^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "25%",
- "max_expansions": 50,
- "boost": 0.8
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_name_phonetic^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "25%",
- "max_expansions": 50,
- "boost": 1.0
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_name_standard^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 3.0
- }
- },
- {
- "function_score": {
- "query": {
- "match_all": {
- "boost": 1.0
- }
- },
- "functions": [
- {
- "filter": {
- "match_all": {
- "boost": 1.0
- }
- },
- "field_value_factor": {
- "field": "store_ctr",
- "modifier": "none",
- "factor": 20.0,
- "missing": 0.0
- }
- }
- ],
- "max_boost": 3.4028235e+38,
- "boost": 1.0,
- "score_mode": "multiply"
- }
- }
- ]
- }
- }
- ],
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "filter": [
- {
- "term": {
- "item_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must": [
- {
- "has_parent": {
- "query": {
- "bool": {
- "filter": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "must": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "2",
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_radius_circle",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "store_max_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "boost": 1.0,
- "ignore_unmapped": false
- }
- },
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_polygon",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "boost": 1.0,
- "store_max_delivery_polygon": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- }
- ]
- }
- },
- {
- "term": {
- "store_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- },
- {
- "terms": {
- "boost": 1.0,
- "store_starting_point": [
- 9,
- 70,
- 82,
- 96,
- 453,
- 5062
- ]
- }
- }
- ],
- "boost": 1.0,
- "must_not": [
- {
- "term": {
- "store_is_test": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "should": [
- {
- "geo_shape": {
- "boost": 1.0,
- "store_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- },
- {
- "geo_distance": {
- "distance": 4400.0,
- "ignore_unmapped": false,
- "distance_type": "arc",
- "store_location": [
- -122.4084229,
- 37.7837394
- ],
- "validation_method": "STRICT",
- "boost": 1.0
- }
- }
- ]
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0
- }
- },
- "score": true,
- "boost": 1.0,
- "ignore_unmapped": false,
- "parent_type": "store"
- }
- }
- ]
- }
- },
- {
- "bool": {
- "filter": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "must": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "2",
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_radius_circle",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "store_max_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "boost": 1.0,
- "ignore_unmapped": false
- }
- },
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_polygon",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "boost": 1.0,
- "store_max_delivery_polygon": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- }
- ]
- }
- },
- {
- "term": {
- "store_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- },
- {
- "terms": {
- "boost": 1.0,
- "store_starting_point": [
- 9,
- 70,
- 82,
- 96,
- 453,
- 5062
- ]
- }
- }
- ],
- "boost": 1.0,
- "must_not": [
- {
- "term": {
- "store_is_test": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "should": [
- {
- "geo_shape": {
- "boost": 1.0,
- "store_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- },
- {
- "geo_distance": {
- "distance": 4400.0,
- "ignore_unmapped": false,
- "distance_type": "arc",
- "store_location": [
- -122.4084229,
- 37.7837394
- ],
- "validation_method": "STRICT",
- "boost": 1.0
- }
- }
- ]
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0
- }
- }
- ]
- }
- },
- "min_score": 2.0,
- "from": 0,
- "size": 650
- }
- # NEW QUERY
- GET consumer_search_index_v6/_search
- {
- "profile": true,
- "query": {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "1",
- "must": [
- {
- "dis_max": {
- "tie_breaker": 0.3,
- "boost": 1.0,
- "queries": [
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "business_tags^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "item_name^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_categories^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 1.5
- }
- },
- {
- "multi_match": {
- "slop": 10,
- "fields": [
- "store_name_ngram^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "25%",
- "max_expansions": 50,
- "boost": 0.8
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_name_phonetic^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "25%",
- "max_expansions": 50,
- "boost": 1.0
- }
- },
- {
- "multi_match": {
- "slop": 0,
- "fields": [
- "store_name_standard^1.0"
- ],
- "fuzzy_transpositions": true,
- "auto_generate_synonyms_phrase_query": true,
- "operator": "OR",
- "type": "best_fields",
- "query": "pizza",
- "prefix_length": 0,
- "zero_terms_query": "NONE",
- "minimum_should_match": "50%",
- "max_expansions": 50,
- "boost": 3.0
- }
- },
- {
- "function_score": {
- "query": {
- "exists": {
- "field": "store_id",
- "boost": 1.0
- }
- },
- "functions": [
- {
- "filter": {
- "match_all": {
- "boost": 1.0
- }
- },
- "field_value_factor": {
- "field": "store_ctr",
- "modifier": "none",
- "factor": 20.0,
- "missing": 0.0
- }
- }
- ],
- "max_boost": 3.4028235e+38,
- "boost": 1.0,
- "score_mode": "multiply"
- }
- }
- ]
- }
- }
- ],
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "filter": [
- {
- "term": {
- "item_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must": [
- {
- "has_parent": {
- "query": {
- "bool": {
- "filter": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "must": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "2",
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_radius_circle",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "store_max_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "boost": 1.0,
- "ignore_unmapped": false
- }
- },
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_polygon",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "boost": 1.0,
- "store_max_delivery_polygon": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- }
- ]
- }
- },
- {
- "term": {
- "store_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- },
- {
- "terms": {
- "boost": 1.0,
- "store_starting_point": [
- 9,
- 70,
- 82,
- 96,
- 453,
- 5062
- ]
- }
- }
- ],
- "boost": 1.0,
- "must_not": [
- {
- "term": {
- "store_is_test": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "should": [
- {
- "geo_shape": {
- "boost": 1.0,
- "store_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- },
- {
- "geo_distance": {
- "distance": 4400.0,
- "ignore_unmapped": false,
- "distance_type": "arc",
- "store_location": [
- -122.4084229,
- 37.7837394
- ],
- "validation_method": "STRICT",
- "boost": 1.0
- }
- }
- ]
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0
- }
- },
- "score": true,
- "boost": 1.0,
- "ignore_unmapped": false,
- "parent_type": "store"
- }
- }
- ]
- }
- },
- {
- "bool": {
- "filter": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "must": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "minimum_should_match": "2",
- "boost": 1.0,
- "should": [
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_radius_circle",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "store_max_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "boost": 1.0,
- "ignore_unmapped": false
- }
- },
- {
- "bool": {
- "adjust_pure_negative": true,
- "boost": 1.0,
- "must_not": [
- {
- "exists": {
- "field": "store_max_delivery_polygon",
- "boost": 1.0
- }
- }
- ]
- }
- },
- {
- "geo_shape": {
- "boost": 1.0,
- "store_max_delivery_polygon": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- }
- ]
- }
- },
- {
- "term": {
- "store_is_active": {
- "boost": 1.0,
- "value": true
- }
- }
- },
- {
- "terms": {
- "boost": 1.0,
- "store_starting_point": [
- 9,
- 70,
- 82,
- 96,
- 453,
- 5062
- ]
- }
- }
- ],
- "boost": 1.0,
- "must_not": [
- {
- "term": {
- "store_is_test": {
- "boost": 1.0,
- "value": true
- }
- }
- }
- ],
- "should": [
- {
- "geo_shape": {
- "boost": 1.0,
- "store_delivery_radius_circle": {
- "shape": {
- "type": "multipoint",
- "coordinates": [
- [
- -122.4084229,
- 37.7837394
- ]
- ]
- },
- "relation": "intersects"
- },
- "ignore_unmapped": false
- }
- },
- {
- "geo_distance": {
- "distance": 4400.0,
- "ignore_unmapped": false,
- "distance_type": "arc",
- "store_location": [
- -122.4084229,
- 37.7837394
- ],
- "validation_method": "STRICT",
- "boost": 1.0
- }
- }
- ]
- }
- }
- ],
- "adjust_pure_negative": true,
- "boost": 1.0
- }
- }
- ]
- }
- },
- "min_score": 2.0,
- "from": 0,
- "size": 650
- }
- ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement