<?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 on: zend search lucene part2 real time indexing</title>
	<atom:link href="http://ganeshhs.com/zend-framework/zend-search-lucene-part2-real-time-indexing/feed" rel="self" type="application/rss+xml" />
	<link>http://ganeshhs.com/zend-framework/zend-search-lucene-part2-real-time-indexing</link>
	<description>thoughts on life, entrepreneurship, technology</description>
	<lastBuildDate>Wed, 01 Feb 2012 03:03:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: Neeraj Kumar</title>
		<link>http://ganeshhs.com/zend-framework/zend-search-lucene-part2-real-time-indexing#comment-80</link>
		<dc:creator>Neeraj Kumar</dc:creator>
		<pubDate>Mon, 19 Dec 2011 05:24:32 +0000</pubDate>
		<guid isPermaLink="false">http://ganeshhs.com/?p=40#comment-80</guid>
		<description>Okay, Can you please provide example of implementing solr in zend framework?</description>
		<content:encoded><![CDATA[<p>Okay, Can you please provide example of implementing solr in zend framework?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ganeshhs</title>
		<link>http://ganeshhs.com/zend-framework/zend-search-lucene-part2-real-time-indexing#comment-75</link>
		<dc:creator>ganeshhs</dc:creator>
		<pubDate>Sat, 17 Dec 2011 08:03:02 +0000</pubDate>
		<guid isPermaLink="false">http://ganeshhs.com/?p=40#comment-75</guid>
		<description>I have preferred to move to apache solr if the data size is more, i am getting that platform developed in house for my products and client projects</description>
		<content:encoded><![CDATA[<p>I have preferred to move to apache solr if the data size is more, i am getting that platform developed in house for my products and client projects</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ganeshhs</title>
		<link>http://ganeshhs.com/zend-framework/zend-search-lucene-part2-real-time-indexing#comment-74</link>
		<dc:creator>ganeshhs</dc:creator>
		<pubDate>Sat, 17 Dec 2011 08:01:15 +0000</pubDate>
		<guid isPermaLink="false">http://ganeshhs.com/?p=40#comment-74</guid>
		<description>Neeraj,
Try optimizing it the index, read the section Index optimization http://framework.zend.com/manual/en/zend.search.lucene.index-creation.html

Try seeing disk I/O and RAM and CPU cycles when you run that. I doubt the resources what is allocated is less.</description>
		<content:encoded><![CDATA[<p>Neeraj,<br />
Try optimizing it the index, read the section Index optimization <a href="http://framework.zend.com/manual/en/zend.search.lucene.index-creation.html" rel="nofollow">http://framework.zend.com/manual/en/zend.search.lucene.index-creation.html</a></p>
<p>Try seeing disk I/O and RAM and CPU cycles when you run that. I doubt the resources what is allocated is less.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neeraj Kumar</title>
		<link>http://ganeshhs.com/zend-framework/zend-search-lucene-part2-real-time-indexing#comment-60</link>
		<dc:creator>Neeraj Kumar</dc:creator>
		<pubDate>Wed, 14 Dec 2011 07:06:56 +0000</pubDate>
		<guid isPermaLink="false">http://ganeshhs.com/?p=40#comment-60</guid>
		<description>Ganesh,

I put the index code in cron. When i tried fetching first 500 users from database then it worked fine but there are 65000+ records in my database use table and when i tried indexing for all records then got the error 

PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to all
ocate 35 bytes) in C:\wamp\www\zendproject\application\models\ZF\User.php on lin
e 250


Where as i have configured memory_limit 512M in php.ini 

Can you please suggest on this.

- Neeraj</description>
		<content:encoded><![CDATA[<p>Ganesh,</p>
<p>I put the index code in cron. When i tried fetching first 500 users from database then it worked fine but there are 65000+ records in my database use table and when i tried indexing for all records then got the error </p>
<p>PHP Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to all<br />
ocate 35 bytes) in C:\wamp\www\zendproject\application\models\ZF\User.php on lin<br />
e 250</p>
<p>Where as i have configured memory_limit 512M in php.ini </p>
<p>Can you please suggest on this.</p>
<p>- Neeraj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ganeshhs</title>
		<link>http://ganeshhs.com/zend-framework/zend-search-lucene-part2-real-time-indexing#comment-59</link>
		<dc:creator>ganeshhs</dc:creator>
		<pubDate>Wed, 14 Dec 2011 03:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://ganeshhs.com/?p=40#comment-59</guid>
		<description>Hey Niraj,
You should index the data using crontab script and later use real time indexing when you are trying to add or delete or update.

- Ganesh</description>
		<content:encoded><![CDATA[<p>Hey Niraj,<br />
You should index the data using crontab script and later use real time indexing when you are trying to add or delete or update.</p>
<p>- Ganesh</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neeraj Kumar</title>
		<link>http://ganeshhs.com/zend-framework/zend-search-lucene-part2-real-time-indexing#comment-54</link>
		<dc:creator>Neeraj Kumar</dc:creator>
		<pubDate>Tue, 13 Dec 2011 08:31:41 +0000</pubDate>
		<guid isPermaLink="false">http://ganeshhs.com/?p=40#comment-54</guid>
		<description>HI Ganesh,

I am facing an issue while using Zend Search Lucene as described below:-

I tried creating zend lucene document for users contained in my database table having more than 65000 records. I added the below method in Bootstrap.php

protected function _initZendLucene()
{
    $userObj = new ZF_User();
    $data = $userObj-&gt;fetchAll();
    
    foreach ($data as $d){
      $index = Zend_Search_Lucene::create(APPLICATION_PATH . &#039;/../public/search&#039;);

$doc = new Zend_Search_Lucene_Document();
$doc-&gt;addField(
Zend_Search_Lucene_Field::text(
&#039;first_name&#039;, $d-&gt;getFirstName()) );
$index-&gt;addDocument($doc);

$doc = new Zend_Search_Lucene_Document();
$doc-&gt;addField(
Zend_Search_Lucene_Field::text(
&#039;last_name&#039;, $d-&gt;getLastName()) );
$index-&gt;addDocument($doc);

}
$index-&gt;commit();
}

// ZF_User() is my model for user table

At indexController.php i just tried calling it.

public function indexAction()
{
$index = Zend_Search_Lucene:pen(APPLICATION_PATH . &#039;/../public/search&#039;);
$results = $index-&gt;find(&#039;first_name:neeraj&#039;);

foreach ( $results as $result ) {
echo &quot;name :&quot;.$result-&gt;first_name.&quot;\n&quot;;
}
}

But the issue is it takes so much long time that when i try to browse the home page then script execution stopped. I also increased max_execution_time as well as memory_limit in the php.ini file but it didn&#039;t work for me.

Isn&#039;t there any solution to use lucene or any other searching mechanism for a bulky data record except Full Text search as my table engine is INNODB.</description>
		<content:encoded><![CDATA[<p>HI Ganesh,</p>
<p>I am facing an issue while using Zend Search Lucene as described below:-</p>
<p>I tried creating zend lucene document for users contained in my database table having more than 65000 records. I added the below method in Bootstrap.php</p>
<p>protected function _initZendLucene()<br />
{<br />
    $userObj = new ZF_User();<br />
    $data = $userObj-&gt;fetchAll();</p>
<p>    foreach ($data as $d){<br />
      $index = Zend_Search_Lucene::create(APPLICATION_PATH . &#8216;/../public/search&#8217;);</p>
<p>$doc = new Zend_Search_Lucene_Document();<br />
$doc-&gt;addField(<br />
Zend_Search_Lucene_Field::text(<br />
&#8216;first_name&#8217;, $d-&gt;getFirstName()) );<br />
$index-&gt;addDocument($doc);</p>
<p>$doc = new Zend_Search_Lucene_Document();<br />
$doc-&gt;addField(<br />
Zend_Search_Lucene_Field::text(<br />
&#8216;last_name&#8217;, $d-&gt;getLastName()) );<br />
$index-&gt;addDocument($doc);</p>
<p>}<br />
$index-&gt;commit();<br />
}</p>
<p>// ZF_User() is my model for user table</p>
<p>At indexController.php i just tried calling it.</p>
<p>public function indexAction()<br />
{<br />
$index = Zend_Search_Lucene:pen(APPLICATION_PATH . &#8216;/../public/search&#8217;);<br />
$results = $index-&gt;find(&#8216;first_name:neeraj&#8217;);</p>
<p>foreach ( $results as $result ) {<br />
echo &#8220;name :&#8221;.$result-&gt;first_name.&#8221;\n&#8221;;<br />
}<br />
}</p>
<p>But the issue is it takes so much long time that when i try to browse the home page then script execution stopped. I also increased max_execution_time as well as memory_limit in the php.ini file but it didn&#8217;t work for me.</p>
<p>Isn&#8217;t there any solution to use lucene or any other searching mechanism for a bulky data record except Full Text search as my table engine is INNODB.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

