I'm getting a lot of "static" when searching for the correct way to boost a result when a "Boolean" field type is TRUE, most results are talking about boolean searches.
N.B. We're using the php elastica library but if you can only provide json that's fine, I can manage from that.
I have an index with 5 fields where we have some built in boosting going on as you can see here:
array(
'article_id' => array('type' => 'string', 'include_in_all' => FALSE),
'subject' => array('type' => 'string', 'include_in_all' => TRUE, 'boost' => 8),
'summary' => array('type' => 'string', 'include_in_all' => TRUE, 'boost' => 5),
'content' => array('type' => 'string', 'include_in_all' => TRUE, 'boost' => 3),
'media' => array('type' => 'boolean', 'include_in_all' => FALSE),
'pub_date' => array('type' => 'date', 'include_in_all' => FALSE)
)
I'm also successfully boosting the results at a variety of levels via the pub_date field based on age using the addShould() method on a \Elastica\Query\Bool() query object.
What I would like to do now is boost results further where media is TRUE.
Can someone tell me how to add the appropriate boost for just the media field?