public function __construct($index) { $this->index = $index; $this->query = $this->index->newQuery(); }