Querystring search on array elements in Elastic Search

后端 未结 3 1033
孤独总比滥情好
孤独总比滥情好 2020-12-12 22:40

I\'m trying to learn elasticsearch with a simple example application, that lists quotations associated with people. The example mapping might look like:

{ 
          


        
3条回答
  •  借酒劲吻你
    2020-12-12 22:54

    If scripting is enabled, this should work:

    "script": {
       "inline": "for(element in _source.quotations) { if(element == 'this' && element == 'these') {return true;} }; return false;"
     }
    

提交回复
热议问题