Skip to content

Instantly share code, notes, and snippets.

@dbjpanda
Created August 19, 2017 11:41
Show Gist options
  • Save dbjpanda/d443142e8f95ebeb872b66f2d38792a3 to your computer and use it in GitHub Desktop.
Save dbjpanda/d443142e8f95ebeb872b66f2d38792a3 to your computer and use it in GitHub Desktop.
// Rpt data type query test.
$facets_options['location_rpt'] = [
'field' => 'location_rpt',
'geom' => '["-180 -90" TO "180 90"]',
'gridLevel' => '2',
'maxCells' => '35554432',
'distErrPct' => '',
'distErr' => '',
'format' => 'ints2D',
];
$query->setOption('search_api_facets', $facets_options);
$result = $query->execute();
$expected = [];
$facets = $result->getExtraData('search_api_facets', [])['location_rpt'];
$this->assertEquals($expected, $facets, 'The correct location facets are returned');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment