if (count($article_ids)) {
                    $query->where("story_id", "IN", $article_ids);
                }