In my CloudSearch instance I want to give a greater priority to complete phrases instead of just word counts.
An example would be, when I search for "foo bar" I would like documents that have "foo" and "bar" next to each other be scored better than documents that have the two terms scatterred in the document. Of course, any other document containing either words should retrieved but not scored as highly.
Any ideas of how the query could be done ?
$searchQuery = array(
'query' => "(or ".$searchParam." (phrase boost=10 ".$searchParam."))",
'queryParser' => 'structured',
'queryOptions' => json_encode(array('defaultOperator' => 'or'))
);
This worked to some extend. Totally random boosting value.