<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments for The Simple Part</title>
	<atom:link href="http://karlagius.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://karlagius.com</link>
	<description>It&#039;s not rocket science</description>
	<lastBuildDate>Sun, 05 Feb 2012 20:23:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Karl</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1505</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Sun, 05 Feb 2012 20:23:27 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1505</guid>
		<description>[Resolved over email]

The fix was applied as above. There was some problem with character encoding, but the query worked fine after that was resolved.</description>
		<content:encoded><![CDATA[<p>[Resolved over email]</p>
<p>The fix was applied as above. There was some problem with character encoding, but the query worked fine after that was resolved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Vincas</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1503</link>
		<dc:creator>Vincas</dc:creator>
		<pubDate>Sat, 04 Feb 2012 11:34:35 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1503</guid>
		<description>Parse error: syntax error, unexpected T_STRING in /home/aparatur/domains/aparaturine.lt/public_html/app/code/local/Mage/CatalogSearch/Model/Resource/Fulltext.php on line 353

Could you send me edited fulltext.php file how you imagine.

My email [email removed].</description>
		<content:encoded><![CDATA[<p>Parse error: syntax error, unexpected T_STRING in /home/aparatur/domains/aparaturine.lt/public_html/app/code/local/Mage/CatalogSearch/Model/Resource/Fulltext.php on line 353</p>
<p>Could you send me edited fulltext.php file how you imagine.</p>
<p>My email [email removed].</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Karl</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1502</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Sat, 04 Feb 2012 11:20:48 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1502</guid>
		<description>:/ Try removing the ` quotes around s.data_index, and make sure all the single quote characters are use this character: &#039;</description>
		<content:encoded><![CDATA[<p>:/ Try removing the ` quotes around s.data_index, and make sure all the single quote characters are use this character: &#8216;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Vincas</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1501</link>
		<dc:creator>Vincas</dc:creator>
		<pubDate>Sat, 04 Feb 2012 11:00:43 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1501</guid>
		<description>Parse error: syntax error, unexpected &#039;`&#039; in /home/aparatur/domains/aparaturine.lt/public_html/app/code/local/Mage/CatalogSearch/Model/Resource/Fulltext.php on line 353

:D</description>
		<content:encoded><![CDATA[<p>Parse error: syntax error, unexpected &#8216;`&#8217; in /home/aparatur/domains/aparaturine.lt/public_html/app/code/local/Mage/CatalogSearch/Model/Resource/Fulltext.php on line 353</p>
<p> <img src='http://karlagius.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Karl</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1500</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Sat, 04 Feb 2012 10:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1500</guid>
		<description>Also, I notice you&#039;re editing in the core folder structure. Don&#039;t do that, as any time you update, it will wipe your changes. Instead, create a new folder here:

/home/aparatur/domains/aparaturine.lt/public_html/app/code/local/Mage/CatalogSearch/Model/Resource/

Copy Fulltext.php there and make changes in the new file, not the old one.</description>
		<content:encoded><![CDATA[<p>Also, I notice you&#8217;re editing in the core folder structure. Don&#8217;t do that, as any time you update, it will wipe your changes. Instead, create a new folder here:</p>
<p>/home/aparatur/domains/aparaturine.lt/public_html/app/code/local/Mage/CatalogSearch/Model/Resource/</p>
<p>Copy Fulltext.php there and make changes in the new file, not the old one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Karl</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1499</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Sat, 04 Feb 2012 10:49:07 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1499</guid>
		<description>No, no :) that was just an example :) You need to add this. My bad, was not very clear there.

$like[] = &#039;`s`.`data_index` LIKE :likew&#039;;
$bind[&#039;:likew&#039;] = &#039;%&#039; . $queryText . &#039;%&#039;;</description>
		<content:encoded><![CDATA[<p>No, no <img src='http://karlagius.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  that was just an example <img src='http://karlagius.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You need to add this. My bad, was not very clear there.</p>
<p>$like[] = &#8216;`s`.`data_index` LIKE :likew&#8217;;<br />
$bind[':likew'] = &#8216;%&#8217; . $queryText . &#8216;%&#8217;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Vincas</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1498</link>
		<dc:creator>Vincas</dc:creator>
		<pubDate>Sat, 04 Feb 2012 10:47:08 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1498</guid>
		<description>I added like this:

$like[] = $helper-&gt;getCILike(data_index LIKE ‘%word1 word2%’);

and now getting error:

Parse error: syntax error, unexpected T_STRING in /home/aparatur/domains/aparaturine.lt/public_html/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php on line 356</description>
		<content:encoded><![CDATA[<p>I added like this:</p>
<p>$like[] = $helper-&gt;getCILike(data_index LIKE ‘%word1 word2%’);</p>
<p>and now getting error:</p>
<p>Parse error: syntax error, unexpected T_STRING in /home/aparatur/domains/aparaturine.lt/public_html/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php on line 356</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Karl</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1497</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Sat, 04 Feb 2012 10:35:37 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1497</guid>
		<description>Don&#039;t worry. Replace the following block.

$words = Mage::helper(&#039;core/string&#039;)-&gt;splitWords($queryText, true, $query-&gt;getMaxQueryWords());
                foreach ($words as $word) {
                    $like[] = $helper-&gt;getCILike(&#039;s.data_index&#039;, $word, array(&#039;position&#039; =&gt; &#039;any&#039;));
                }

The reasoning behind it is that we don&#039;t want the words split up. The foreach ($words ...) { .. } loop would create an array like

0: LIKE &#039;word1&#039;
1: LIKE &#039;word2&#039;
...
Which would end up as &quot;Where (data_index LIKE &#039;word1&#039; OR data_index LIKE &#039;word2&#039;)&quot; etc. By replacing that block, you keep the search terms together, and so only get one condition for the like block: (data_index LIKE &#039;%word1 word2%&#039;).

Let me know how it goes!</description>
		<content:encoded><![CDATA[<p>Don&#8217;t worry. Replace the following block.</p>
<p>$words = Mage::helper(&#8216;core/string&#8217;)->splitWords($queryText, true, $query->getMaxQueryWords());<br />
                foreach ($words as $word) {<br />
                    $like[] = $helper->getCILike(&#8216;s.data_index&#8217;, $word, array(&#8216;position&#8217; => &#8216;any&#8217;));<br />
                }</p>
<p>The reasoning behind it is that we don&#8217;t want the words split up. The foreach ($words &#8230;) { .. } loop would create an array like</p>
<p>0: LIKE &#8216;word1&#8242;<br />
1: LIKE &#8216;word2&#8242;<br />
&#8230;<br />
Which would end up as &#8220;Where (data_index LIKE &#8216;word1&#8242; OR data_index LIKE &#8216;word2&#8242;)&#8221; etc. By replacing that block, you keep the search terms together, and so only get one condition for the like block: (data_index LIKE &#8216;%word1 word2%&#8217;).</p>
<p>Let me know how it goes!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Vincas</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1496</link>
		<dc:creator>Vincas</dc:creator>
		<pubDate>Sat, 04 Feb 2012 10:12:49 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1496</guid>
		<description>Sorry, I&#039;m a little bit newbie.

So I don&#039;t understand something:
this line:

$like[] = $helper-&gt;getCILike(‘s.data_index’, $word, array(‘position’ =&gt; ‘any’));

need change to:

$like[] = &#039;`s`.`data_index` LIKE :likew&#039;;
$bind[&#039;:likew&#039;] = &#039;%&#039; . $queryText . &#039;%&#039;;

?</description>
		<content:encoded><![CDATA[<p>Sorry, I&#8217;m a little bit newbie.</p>
<p>So I don&#8217;t understand something:<br />
this line:</p>
<p>$like[] = $helper-&gt;getCILike(‘s.data_index’, $word, array(‘position’ =&gt; ‘any’));</p>
<p>need change to:</p>
<p>$like[] = &#8216;`s`.`data_index` LIKE :likew&#8217;;<br />
$bind[':likew'] = &#8216;%&#8217; . $queryText . &#8216;%&#8217;;</p>
<p>?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Magento Search: Getting Better Results In Product Searches by Karl</title>
		<link>http://karlagius.com/2012/01/17/magento-search-better-results-product-searches/comment-page-1/#comment-1495</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Sat, 04 Feb 2012 09:57:05 +0000</pubDate>
		<guid isPermaLink="false">http://karlagius.com/?p=423#comment-1495</guid>
		<description>Hello again,

Yes, that should be it. In the end, you want $like to be an array with 1 element, which would be your search term. 

You might want to call escapeLikeValue on the search term before you add it in though - that will escape any characters which may cause trouble in the query.

Remember to switch the search mode to LIKE in the admin, otherwise this change will be bypassed :)</description>
		<content:encoded><![CDATA[<p>Hello again,</p>
<p>Yes, that should be it. In the end, you want $like to be an array with 1 element, which would be your search term. </p>
<p>You might want to call escapeLikeValue on the search term before you add it in though &#8211; that will escape any characters which may cause trouble in the query.</p>
<p>Remember to switch the search mode to LIKE in the admin, otherwise this change will be bypassed <img src='http://karlagius.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>

