9 use Magento\Search\Model\ResourceModel\Query\CollectionFactory as QueryCollectionFactory;
110 QueryCollectionFactory $queryCollectionFactory,
111 CollectionFactory $searchCollectionFactory,
115 DbCollection $resourceCollection =
null,
118 $this->_queryCollectionFactory = $queryCollectionFactory;
119 $this->_searchCollectionFactory = $searchCollectionFactory;
121 $this->_scopeConfig = $scopeConfig;
142 return $this->_searchCollectionFactory->create();
155 $collection = $this->_queryCollectionFactory->create()->setStoreId(
214 $storeId = $this->_storeManager->getStore()->getId();
227 if (!$this->
getId()) {
228 $this->setIsActive(0);
229 $this->setIsProcessed(0);
231 $this->setIsActive(1);
246 $this->
getResource()->saveIncrementalPopularity($this);
261 $this->setNumResults($numResults);
275 return $this->_scopeConfig->getValue(
276 self::XML_PATH_MIN_QUERY_LENGTH,
277 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE,
290 return $this->_scopeConfig->getValue(
291 self::XML_PATH_MAX_QUERY_LENGTH,
292 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE,
313 return $this->
getData(
'is_query_text_exceeded');
325 return $this->
getData(
'is_query_text_short');
setData($key, $value=null)
$_searchCollectionFactory
getData($key='', $index=null)
const XML_PATH_MIN_QUERY_LENGTH
setOrigData($key=null, $data=null)
saveIncrementalPopularity()
const XML_PATH_MAX_QUERY_LENGTH
saveNumResults($numResults)
__construct(\Magento\Framework\Model\Context $context, Registry $registry, QueryCollectionFactory $queryCollectionFactory, CollectionFactory $searchCollectionFactory, StoreManagerInterface $storeManager, ScopeConfigInterface $scopeConfig, AbstractResource $resource=null, DbCollection $resourceCollection=null, array $data=[])