-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added "searching for xxxx insted" notice
Improved "did you mean" to use native search notice. Extended Self Test with Autocomplete and Suggest Search results are saved in registry as a JeroenVermeulen_Solarium_Model_SearchResult object.
- Loading branch information
1 parent
3be16ff
commit b308b60
Showing
8 changed files
with
169 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
app/code/community/JeroenVermeulen/Solarium/Model/SearchResult.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
/** | ||
* JeroenVermeulen_Solarium | ||
* | ||
* NOTICE OF LICENSE | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://opensource.org/licenses/osl-3.0.php | ||
* | ||
* DISCLAIMER | ||
* | ||
* Do not edit or add to this file if you wish to upgrade this Module to | ||
* newer versions in the future. | ||
* | ||
* @category JeroenVermeulen | ||
* @package JeroenVermeulen_Solarium | ||
* @copyright Copyright (c) 2014 Jeroen Vermeulen (http://www.jeroenvermeulen.eu) | ||
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
/** | ||
* Class JeroenVermeulen_Solarium_Model_SearchResult | ||
* | ||
* Container for search result data from Solr. | ||
* When a search has been executed, this object is available via: | ||
* Mage::registry( 'solarium_search_result' ); | ||
* | ||
* @method setStoreId( int $storeId ) | ||
* @method int getStoreId() | ||
* @method setUserQuery( string $query ) | ||
* @method string getUserQuery() | ||
* @method setResultQuery( string $query ) | ||
* @method string getResultQuery() | ||
* @method JeroenVermeulen_Solarium_Model_SearchResult setResultProducts($data) | ||
* @method array getResultProducts() | ||
* @method JeroenVermeulen_Solarium_Model_SearchResult setSuggestions($data) | ||
* @method array getSuggestions() | ||
*/ | ||
class JeroenVermeulen_Solarium_Model_SearchResult extends Mage_Core_Model_Abstract | ||
{ | ||
// Most of the work is done by Magento's Mage_Core_Model_Abstract. | ||
|
||
/** @return bool - True if autocorrect changed the the string to search for. */ | ||
public function didAutoCorrect() { | ||
return( $this->getUserQuery() && $this->getResultQuery() && $this->getUserQuery() != $this->getResultQuery() ); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 0 additions & 19 deletions
19
app/design/frontend/base/default/template/jeroenvermeulen/solarium/suggest.phtml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.