I wanting to query one term across multiple indexes, types, and fields. I've been reading and experimenting with no working solution... yet.
It's time to ask.
It works until I un-comment the second match clause. Thinking I need an OR somewhere, don't know if this is even possible. The "post" type is for the wordpress index, the "oa_basic" type is for the other three indexes. post_content and content fields map to respective types and indexes. Hope this explanation makes sense...
What have I missed or where should I be reading? Thank-you
My php is code is as follows;
q = _GET['q'];
$params = array();
$params['size'] = 50;
$params['index'] = 'oa-assn-20oct2019,oa-prtnr-20oct2019,oa-mastr-21oct2019,oa-1382185244wordpress-post-1';
$params['type'] = 'oa_basic,post';
$params['body']['query']['bool']['should']['match']['content'] = $q;
// $params['body']['query']['bool']['should']['match']['post_content'] = $q;
$response = $es->search($params);