Version Notes
Changelog:
* Limit search results to a single page of 100.
Download this release
Release Info
| Developer | Swiftype |
| Extension | Swiftype_Swiftype |
| Version | 1.0.3 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.2 to 1.0.3
app/code/community/Swiftype/Swiftype/Model/Resource/Fulltext.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
class Swiftype_Swiftype_Model_Resource_Fulltext
|
| 4 |
extends Mage_CatalogSearch_Model_Resource_Fulltext
|
| 5 |
{
|
| 6 |
-
const PER_PAGE =
|
| 7 |
|
| 8 |
final public function cleanIndex($storeId = null, $productId = null)
|
| 9 |
{
|
|
@@ -70,15 +70,7 @@ class Swiftype_Swiftype_Model_Resource_Fulltext
|
|
| 70 |
{
|
| 71 |
$results = array();
|
| 72 |
$result = $this->_getResult($query);
|
| 73 |
-
$results = $result->records->product;
|
| 74 |
-
|
| 75 |
-
if ($result->info->product->num_pages > 1) {
|
| 76 |
-
for ($page = 2; $page <= $result->info->product->num_pages; $page++) {
|
| 77 |
-
$result = $this->_getResult($query, $page);
|
| 78 |
-
$results = array_merge($results, $result->records->product);
|
| 79 |
-
}
|
| 80 |
-
}
|
| 81 |
-
|
| 82 |
return $results;
|
| 83 |
}
|
| 84 |
|
| 3 |
class Swiftype_Swiftype_Model_Resource_Fulltext
|
| 4 |
extends Mage_CatalogSearch_Model_Resource_Fulltext
|
| 5 |
{
|
| 6 |
+
const PER_PAGE = 100;
|
| 7 |
|
| 8 |
final public function cleanIndex($storeId = null, $productId = null)
|
| 9 |
{
|
| 70 |
{
|
| 71 |
$results = array();
|
| 72 |
$result = $this->_getResult($query);
|
| 73 |
+
$results = $result->records->product;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
return $results;
|
| 75 |
}
|
| 76 |
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Swiftype_Swiftype</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.gnu.org/licenses/agpl.html">AGPL</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -16,13 +16,11 @@
|
|
| 16 |
* Autocomplete: Sometimes a search isn't even necessary; our search engines come with autocomplete built-in, and your users will thank you for having it.</description>
|
| 17 |
<notes>Changelog:
|
| 18 |

|
| 19 |
-
*
|
| 20 |
-
* Ensure URI parameters are encoded
|
| 21 |
-
* Ensure Swiftype parameters (API key, engine key, engine slug) are stripped of invalid characters</notes>
|
| 22 |
<authors><author><name>Swiftype</name><user>swiftypeteam</user><email>team@swiftype.com</email></author></authors>
|
| 23 |
-
<date>2014-
|
| 24 |
-
<time>
|
| 25 |
-
<contents><target name="magecommunity"><dir name="Swiftype"><dir name="Swiftype"><dir name="Block"><dir name="Ajax"><file name="Suggest.php" hash="e5b55a9c41709eeffe31a6ea266876bc"/></dir><file name="Autocomplete.php" hash="f42063444facdccc951700591a82f8ca"/></dir><dir name="Helper"><file name="Data.php" hash="e620dce46e1af6183cb135f966656fba"/><file name="Log.php" hash="544a2a7075d3dec2d8c81eef0656f8a4"/></dir><dir name="Model"><dir name="Observer"><file name="Adminhtml.php" hash="6a1420a1fe9c7a7d7f3b90b5260af196"/><file name="Frontend.php" hash="923f4348d2b2785dfca43df9f2355e40"/><file name="Global.php" hash="8764a09f34b456cb729543616e0de889"/></dir><dir name="Request"><file name="Processor.php" hash="ca7fbb10d1dc0920ddb9605f7c9e310c"/></dir><dir name="Resource"><dir name="Fulltext"><file name="Engine.php" hash="5d95d1b7ea2d13c05478c4fec69d27d5"/></dir><file name="Fulltext.php" hash="
|
| 26 |
<compatible/>
|
| 27 |
<dependencies><required><php><min>5.3.0</min><max>5.7.0</max></php></required></dependencies>
|
| 28 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Swiftype_Swiftype</name>
|
| 4 |
+
<version>1.0.3</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.gnu.org/licenses/agpl.html">AGPL</license>
|
| 7 |
<channel>community</channel>
|
| 16 |
* Autocomplete: Sometimes a search isn't even necessary; our search engines come with autocomplete built-in, and your users will thank you for having it.</description>
|
| 17 |
<notes>Changelog:
|
| 18 |

|
| 19 |
+
* Limit search results to a single page of 100.</notes>
|
|
|
|
|
|
|
| 20 |
<authors><author><name>Swiftype</name><user>swiftypeteam</user><email>team@swiftype.com</email></author></authors>
|
| 21 |
+
<date>2014-07-01</date>
|
| 22 |
+
<time>15:12:39</time>
|
| 23 |
+
<contents><target name="magecommunity"><dir name="Swiftype"><dir name="Swiftype"><dir name="Block"><dir name="Ajax"><file name="Suggest.php" hash="e5b55a9c41709eeffe31a6ea266876bc"/></dir><file name="Autocomplete.php" hash="f42063444facdccc951700591a82f8ca"/></dir><dir name="Helper"><file name="Data.php" hash="e620dce46e1af6183cb135f966656fba"/><file name="Log.php" hash="544a2a7075d3dec2d8c81eef0656f8a4"/></dir><dir name="Model"><dir name="Observer"><file name="Adminhtml.php" hash="6a1420a1fe9c7a7d7f3b90b5260af196"/><file name="Frontend.php" hash="923f4348d2b2785dfca43df9f2355e40"/><file name="Global.php" hash="8764a09f34b456cb729543616e0de889"/></dir><dir name="Request"><file name="Processor.php" hash="ca7fbb10d1dc0920ddb9605f7c9e310c"/></dir><dir name="Resource"><dir name="Fulltext"><file name="Engine.php" hash="5d95d1b7ea2d13c05478c4fec69d27d5"/></dir><file name="Fulltext.php" hash="2603cb525d5516bd03b657caa6cf1169"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Catalog"><dir name="Search"><file name="Engine.php" hash="a9faa3a31d39cedf2e20fa6e50cc1a66"/></dir></dir></dir></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="0d61e11d4d332041f75981304546ff1b"/><file name="AnalyticsController.php" hash="8c8742944ddcf89182f6a03f49e747c4"/></dir><dir name="etc"><file name="config.xml" hash="3227643a18db99d75417eea199ed136c"/><file name="system.xml" hash="a372d79b32358f00aac38cf8864ca715"/></dir><dir name="sql"><dir name="swiftype_setup"><file name="install-1.php" hash="720c6d503a3493b9be8e34ff9af49528"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="swiftype.xml" hash="b32acb6177dbf205ede8e0b0c2601705"/></dir><dir name="template"><dir name="swiftype"><dir name="ajax"><file name="suggest.phtml" hash="bd7164f8033e2157adb4127e4eacde26"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Swiftype_Swiftype.xml" hash="6894235a6d3edae4c2f5aa04407274d6"/></dir><dir name="."><file name="swiftype.xml" hash="20e640f1fa6945f853c2d29e3c2f94d9"/></dir></target></contents>
|
| 24 |
<compatible/>
|
| 25 |
<dependencies><required><php><min>5.3.0</min><max>5.7.0</max></php></required></dependencies>
|
| 26 |
</package>
|
