/** * @return string */ protected function getPageBrowserRange() { $label = ''; $resultsFrom = $this->search->getResponseBody()->start + 1; $resultsTo = $resultsFrom + count($this->search->getResultDocuments()) - 1; $resultsTotal = $this->search->getNumberOfResults(); $label = strtr($this->parentPlugin->pi_getLL('results_range'), array('@resultsFrom' => $resultsFrom, '@resultsTo' => $resultsTo, '@resultsTotal' => $resultsTotal)); return $label; }
/** * Queries Solr for the current page's documents. * * @return array An array of Apache_Solr_Document objects */ protected function getIndexDocuments() { /* @var Query $query */ $query = GeneralUtility::makeInstance('ApacheSolrForTypo3\\Solr\\Query', ''); $query->setQueryType('standard'); $query->useRawQueryString(true); $query->setQueryString('*:*'); $query->addFilter('(type:pages AND uid:' . $this->pageId . ') OR (*:* AND pid:' . $this->pageId . ' NOT type:pages)'); $query->addFilter('siteHash:' . Site::getSiteByPageId($this->pageId)->getSiteHash()); $query->setFieldList('*'); $query->setSorting('type asc, title asc'); $this->search->search($query, 0, 10000); return $this->search->getResultDocuments(); }