Advertisement
Guest User

Untitled

a guest
Jul 17th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 3.81 KB | None | 0 0
  1. DELETE rigla_catalogsearch_fulltext_tmp
  2. GET rigla_catalogsearch_fulltext/_search
  3. {
  4.   "sort": [
  5.     {
  6.       "name_raw.sort": "ASC"
  7.     }
  8.   ],
  9.   "size": 200,
  10.     "query": {
  11.         "match": {
  12.             "name_raw": "Z"
  13.         }
  14.     },
  15.   "_source": [
  16.     "name_raw"
  17.   ]
  18. }
  19.  
  20. GET rigla_catalogsearch_fulltext_tmp/_search
  21. { "query": {
  22.     "prefix" : { "name.not_analyzed" : "А" }
  23.    }
  24. }
  25.  
  26. GET rigla_catalogsearch_fulltext/_search
  27. {
  28.   "sort": [
  29.     {
  30.       "product_qty_raw.default": {
  31.         "order": "DESC",
  32.         "nested": {
  33.           "path": "product_qty_raw"
  34.         }
  35.       }
  36.     },
  37.     {
  38.       "_score": "DESC"
  39.     },
  40.     {
  41.       "name_raw.sort": "ASC"
  42.     }
  43.   ],
  44.   "size": 20,
  45.   "query": {
  46.     "bool": {
  47.       "minimum_should_match": 1,
  48.       "should": [
  49.         {
  50.           "query_string": {
  51.             "fields": [
  52.               "name_raw.search^5"
  53.             ],
  54.             "query": "(((*головокружение* OR головокружение*^2)))"
  55.           }
  56.         },
  57.         {
  58.           "query_string": {
  59.             "fields": [
  60.               "r_simptomy.search^4"
  61.             ],
  62.             "query": "(((*головокружение* OR головокружение*^2)))"
  63.           }
  64.         },
  65.         {
  66.           "query_string": {
  67.             "fields": [
  68.               "manufacturer_id.search^5"
  69.             ],
  70.             "query": "(((*головокружение* OR головокружение*^2)))"
  71.           }
  72.         },
  73.         {
  74.           "query_string": {
  75.             "fields": [
  76.               "mnn_id.search^2"
  77.             ],
  78.             "query": "(((*головокружение* OR головокружение*^2)))"
  79.           }
  80.         },
  81.         {
  82.           "query_string": {
  83.             "fields": [
  84.               "sku_raw.search^10"
  85.             ],
  86.             "query": "(((*головокружение* OR головокружение*^2)))"
  87.           }
  88.         }
  89.       ],
  90.       "must": [
  91.         {
  92.           "terms": {
  93.             "visibility_raw": [
  94.               3,
  95.               4
  96.             ]
  97.           }
  98.         }
  99.       ]
  100.     }
  101.   },
  102.   "highlight": {
  103.     "fields": {
  104.       "name_raw.search": {
  105.         "type": "plain",
  106.         "pre_tags": "",
  107.         "post_tags": "",
  108.         "fragment_size": 1
  109.       },
  110.       "r_simptomy.search": {
  111.         "type": "plain",
  112.         "pre_tags": "",
  113.         "post_tags": "",
  114.         "fragment_size": 1
  115.       },
  116.       "manufacturer_id.search": {
  117.         "type": "plain",
  118.         "pre_tags": "",
  119.         "post_tags": "",
  120.         "fragment_size": 1
  121.       },
  122.       "mnn_id.search": {
  123.         "type": "plain",
  124.         "pre_tags": "",
  125.         "post_tags": "",
  126.         "fragment_size": 1
  127.       },
  128.       "sku_raw.search": {
  129.         "type": "plain",
  130.         "pre_tags": "",
  131.         "post_tags": "",
  132.         "fragment_size": 1
  133.       }
  134.     }
  135.   },
  136.   "_source": [
  137.     "id",
  138.     "product_url",
  139.     "brands_url",
  140.     "manufactures_url",
  141.     "lekforms_url",
  142.     "ingridients_url",
  143.     "brandlines_url",
  144.     "id_raw",
  145.     "sku_raw",
  146.     "name_raw",
  147.     "url_key_raw",
  148.     "promo_label_raw",
  149.     "thumbnail_raw",
  150.     "price_raw.default",
  151.     "manufacturer_id",
  152.     "manufacturer_id_raw",
  153.     "is_in_stock_raw.default",
  154.     "manufactures_url_raw",
  155.     "brands_url_raw",
  156.     "manufactures_url_raw",
  157.     "highlight_raw",
  158.     "rec_need_raw",
  159.     "category_ids_raw",
  160.     "attribute_set_id_raw",
  161.     "url_key_raw",
  162.     "type_id_raw",
  163.     "sku_raw",
  164.     "special_price_raw",
  165.     "special_price_from_raw",
  166.     "special_price_to_raw"
  167.   ]
  168. }
  169.  
  170. GET rigla_attribute_full_model/_search
  171. {
  172.   "query": {
  173.     "term": {
  174.       "is_searchable": {
  175.         "value": "1"
  176.       }
  177.     }
  178.   }
  179.   , "_source": "attribute_code"
  180. }
  181. DELETE rigla_catalogsearch_fulltext_tmp
  182. DELETE .kibana_1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement