Lines Matching refs:this

53         $this->_search = $search;
54 $this->expiryTime = $expiryTime;
64 if (!$this->_currentResultSet) {
68 return $this->_currentResultSet;
82 $this->_currentResultSet = null;
83 if ($this->currentPage < $this->totalPages) {
84 $this->_saveOptions();
86 $this->_search->setOption(Search::OPTION_SCROLL, $this->expiryTime);
87 $this->_search->setOption(Search::OPTION_SCROLL_ID, $this->_nextScrollId);
89 $this->_setScrollId($this->_search->search());
91 $this->_revertOptions();
94 $this->clear();
105 return $this->_nextScrollId;
115 return null !== $this->_nextScrollId;
130 $this->_options = [null, null, null];
131 $this->currentPage = 0;
134 $this->_saveOptions();
136 $this->_search->setOption(Search::OPTION_SCROLL, $this->expiryTime);
137 $this->_search->setOption(Search::OPTION_SCROLL_ID, null);
138 $this->_currentResultSet = null;
139 $this->_setScrollId($this->_search->search());
141 $this->_revertOptions();
145 * Cleares the search context on ES and marks this Scroll instance as finished.
153 if (null !== $this->_nextScrollId) {
154 $this->_search->getClient()->request(
157 [Search::OPTION_SCROLL_ID => [$this->_nextScrollId]]
161 $this->_nextScrollId = null;
174 if (0 === $this->currentPage) {
175 $this->totalPages = $resultSet->count() > 0 ? \ceil($resultSet->getTotalHits() / $resultSet->count()) : 0;
178 $this->_currentResultSet = $resultSet;
179 ++$this->currentPage;
180 $this->_nextScrollId = null;
182 $this->_nextScrollId = $resultSet->getResponse()->getScrollId();
184 $this->clear();
194 if ($this->_search->hasOption(Search::OPTION_SCROLL)) {
195 $this->_options[0] = $this->_search->getOption(Search::OPTION_SCROLL);
198 if ($this->_search->hasOption(Search::OPTION_SCROLL_ID)) {
199 $this->_options[1] = $this->_search->getOption(Search::OPTION_SCROLL_ID);
202 if ($this->_search->hasOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE)) {
203 $isNotInitial = (null !== $this->_options[2]);
204 $this->_options[2] = $this->_search->getOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE);
208 $searchOptions = $this->_search->getOptions();
210 $this->_search->setOptions($searchOptions);
220 $this->_search->setOption(Search::OPTION_SCROLL, $this->_options[0]);
221 $this->_search->setOption(Search::OPTION_SCROLL_ID, $this->_options[1]);
222 if (null !== $this->_options[2]) {
223 $this->_search->setOption(Search::OPTION_SEARCH_IGNORE_UNAVAILABLE, $this->_options[2]);