title: Fatal Error when using search bar on Magento Website
body: <p>Hello dear community, </p>
  
  <p>Apologies in advance if I break any formalities in asking this question. </p>
  
  <p>When using the search bar for our Magento website, it returns a fatal error. "<strong>Fatal error: Call to a member function prepareTerms() on boolean in [file path] on line 341"</strong>. </p>
  
  <p>Line 341 and the prepareTerms() function seems like it is related to a public function prepareResult that begins a few lines above. Here is that entire portion:</p>
  
  <pre><code> public function prepareResult($object, $queryText, $query)
  {       
      $adapter = $this-&gt;_getWriteAdapter();
      if (!$query-&gt;getIsProcessed()) {
          $searchType = $object-&gt;getSearchType($query-&gt;getStoreId());
  
          $preparedTerms = Mage::getResourceHelper('catalogsearch')
              -&gt;prepareTerms($queryText, $query-&gt;getMaxQueryWords());
  </code></pre>
  
  <p>That bottom line is the line <strong>341</strong> that the error message references. </p>
  
  <p><strong>EDIT</strong> thanks to the comment from rickdenhaan I see now that the issue is with the line <strong>340</strong>  <code>$preparedTerms = Mage::getResourceHelper('catalogsearch')</code> which seems to not be returning the desired result. If anyone is familiar with how the catalogsearch model is defined that would very likely be a huge help! I am doing more research on this in the meantime. I found this example (under example #9) which looks very similar to what is going on in the file I am trying to troubleshoot. Here is the link: <a href="https://hotexamples.com/examples/-/Mage/getResourceHelper/php-mage-getresourcehelper-method-examples.html#0xa82d1ee83ee0b30839a7d2a2946c67a0c2bc8f497a62e25aabf1f9508b93c8b8-34,,46" rel="nofollow noreferrer">https://hotexamples.com/examples/-/Mage/getResourceHelper/php-mage-getresourcehelper-method-examples.html#0xa82d1ee83ee0b30839a7d2a2946c67a0c2bc8f497a62e25aabf1f9508b93c8b8-34,,46</a>,</p>
  
  <p>Would be greatly appreciated if anyone has any ideas of how I can troubleshoot this or if there is any additional information I can provide or look into to further progress on this! Thank you very much!</p>