I'm trying to run a query that on a field called bookable_date
. I want to be able to return results that have a bookable_date
in May and a bookable_date
in July and not return results for the month of June. I'm using the first-party PHP client here: GitHub - swiftype/swiftype-site-search-php
Here's one of my approaches -- no results.
$args['bookable_date'] = array(
"type"=> "or",
"values"=> array(
array(
"type"=>"range",
"from"=>'2019-01-01T00:00:00+00:00',
"to"=> '2019-01-31T00:00:00+00:00',
),
array (
"type"=>"range",
"from"=>'2019-05-01T00:00:00+00:00',
"to"=> '2019-05-31T00:00:00+00:00',
)
)
);
The $args
variable is later passed to $st_args
in the filters array. Which is then sent to Swiftype like this:
$response = $client->search($engine , stripslashes($s), $st_args);