/** * @return string * * @throws \RuntimeException if documentName is null */ public function getQuery() { $documentName = $this->documentName; if ($documentName == null) { throw new \RuntimeException('documentName should not be null'); } $query = sprintf('id:%s_*', $documentName); $this->setQuery($query); return parent::getQuery(); }
/** * @return string * * @throws \RuntimeException when id or document_name is null */ public function getQuery() { $idField = $this->documentKey; if ($idField == null) { throw new \RuntimeException('id should not be null'); } $query = sprintf('id:%s', $idField); $this->setQuery($query); return parent::getQuery(); }
/** * @return string * * @throws \RuntimeException if documentName is null */ public function getQuery() { $documentNameField = $this->document->document_name_s; if ($documentNameField == null) { throw new \RuntimeException('documentName should not be null'); } $query = sprintf('document_name_s:%s', $documentNameField); $this->setQuery($query); return parent::getQuery(); }