I have the following CloudSearch request
$query = array(
'query' => '(and expiry:[' . $time . ',} updatetime:[100,} type:\'all\')',
'queryParser' => 'structured',
'queryOptions' => '{"defaultOperator":"and"}',
'sort' => 'distance asc',
'return'=>'_all_fields,_score,distance',
'size' => 5000,
'expr'=> '{"distance":"haversin(' . $lat . ',' . $lon . ',location.latitude,location.longitude)"}',
'start'=>$start,
'fq'=>'location:[\'35.628611,-120.694152\',\'35.621966,-120.686706\']'
);
The query works, with the exception of the FQ part, it is assumed that fq will limit the results within the bounding box region. but, despite its presence, does not limit the results. Results far beyond this region are returning. What do I need to change for it to work correctly?
source
share