...
 
Commits (2)
......@@ -56,6 +56,11 @@ class Analytics
'field' => '@reviewed',
],
],
[
'term' => [
'is_campaign' => true
],
],
],
],
],
......
......@@ -48,6 +48,12 @@ class ElasticRepository
],
];
$must_not[] = [
'term' => [
'is_campaign' => true,
]
];
if ($opts['offset']) {
$must[] = [
'range' => [
......
......@@ -53,7 +53,7 @@ class Repository
$query->setOpts([
'page_size' => (int) $opts['limit'],
'paging_state_token' => base64_decode($opt['token'])
'paging_state_token' => base64_decode($opts['token'])
]);
$response = new Response();
......@@ -79,6 +79,11 @@ class Repository
$data['@created'] = $data['@created'] * 1000;
}
if ($data['is_campaign'] ?? false) {
// Skip campaigns
continue;
}
$boost->setGuid((string) $row['guid'])
->setMongoId($data['_id'])
->setEntityGuid($data['entity_guid'])
......
......@@ -152,6 +152,12 @@ class Repository
$boost = (new Entities\Boost\Factory())->build($row['type']);
$boost->loadFromArray($row['data']);
$data = @json_decode($row['data'], true);
if ($data && $data['is_campaign']) {
continue;
}
$boosts[] = $boost;
}
......