27 Mar
Posted by Ganesh H S , Bangalore, India as zend framework
Zend_Search_Lucene_Search_Query::highlightMatches() method allows the developer to highlight HTML document terms in the context of a search query.
In the previous article Zend Lucene Search - part3 - retrieving the indexed data i talked about retrieving the search results. When we search, highlighting […]
17 Mar
Posted by Ganesh H S , Bangalore, India as zend framework
Once the index is created, we are ready use zend lucene search to search the website. In the following example, php is the search keyword used to fetch the relevant search results in the already indexed data.
<?php
require_once ‘Zend/Search/Lucene.php’;$query = “php”;
$index = Zend_Search_Lucene::open(”/var/www/lucene-data/blog-index”);
$results = $index->find($query);
echo “Index contains “.$index->count().” documents.\n\n”;
if($index->count())
{
$count = 0;
foreach ($results as $result)
{
$data[$count][”article_url”] […]
17 Mar
Posted by Ganesh H S , Bangalore, India as zend framework
For creating the index from the existing data, we need to create the index. Isn’t it a better idea to index each data when its created, to index the real time data we need to open the index which was created earlier, rest of the other things remains same as discussed in the Zend lucene […]
17 Mar
Posted by Ganesh H S , Bangalore, India as zend framework
In this article i will be discussing about creating index using zend lucene search .
Conventionally most of the site search are powered by database driven.
Lets consider my blog site, if anyone comes to my site and wants to search for any keyword, if i have to give search results i may have to look into […]