using minimum_match inside filter in elasticsearch -


i'm trying build elastic-call wanna sett filters within curtain area, like:

{     "query" : {         "filtered" : {             "query"  : {                 "match_all" : { }             },             "filter" : {                 "and" : [                     {                         "bool" : {                             "must" : {                                 "terms" : {                                     "my_filter"     : [1, 2, 4],                                     "minimum_match" : 3                                 }                             }                         }                     },                     {                         "geo_distance" : {                             "location" : "56.20123,14.3240234",                             "distance" : "30km"                         }                     }                 ]             }         }     } } 

however when trying "minimum_match not allowed terms in filter, there way around this?

i've tried use bool query not allowed filter on one

can please make try minimum_match query. below

{    "query": {       "filtered": {          "query": {             "match_all": {}          },          "filter": {             "and": {                "filters": [                   {                      "query": {                         "terms": {                                 "my_filter"     : [1, 2, 4],                                 "minimum_match" : 3                         }                      }                   },                   {                      "geo_distance": {                         "location": "56.20123,14.3240234",                         "distance": "30km"                      }                   }                ]             }          }       }    } } 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -