Advertisement
krot

elasticsearch @ symbol filter

Jun 10th, 2020
1,697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.72 KB | None | 0 0
  1. {
  2.   "query": {
  3.     "bool": {
  4.       "must": [
  5.         {
  6.           "match": {
  7.             "body" : {
  8.                 "query" : "text les",
  9.                 "operator": "and"
  10.             }
  11.           }
  12.         }
  13.       ]
  14.      
  15.       ,
  16.       "filter": [
  17.             {
  18.                 "term": {
  19.                     "remote.keyword": "1@localhost"
  20.                 }
  21.             }
  22.             ]
  23.      
  24.     }
  25.   }
  26. }
  27. ----------
  28. {
  29.     "sort":[{"mam_id":{"order":"asc"}}],
  30.     "size":50,
  31.     "query":{
  32.         "bool":{
  33.             "must":{
  34.                 "simple_query_string":{
  35.                     "query":"text les",
  36.                     "fields":["body"],
  37.                     "default_operator":"and"
  38.                     }
  39.                     },
  40.                     "filter":[
  41.                             {
  42.                                 "term":{
  43.                                     "owner.keyword":"1@localhost"
  44.                                     }
  45.                             }
  46.                             ]
  47.         }
  48.        
  49.         }
  50.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement