Welcome Guest, Not a member yet? Register   Sign In
implementing a search engine
#1

[eluser]andyd[/eluser]
Hi all CIers, i have been Rapidly developing a website for a UK store and wanted to find out if there was anyone with a 'off the shelf' search engine script.

I want to search multiple tables for a query of words and wondered if anyone can point me in the right direction.

Kind regards

Andy
#2

[eluser]stevepaperjam[/eluser]
Is it worth trying phpdig?
#3

[eluser]andyd[/eluser]
i am more interested in seeing code examples of how people have implemented a multi table search.

I have it working, but the query is generating around 2mb of data (info from the benchmark CI function <?=$this->benchmark->memory_usage();?>

The problem is that it is using too much memory and i have all the search results in a single query calling 7 tables to get all the results. Therefore i am not convinced I have a very optimised script and want to try something new.

My plan is to just get the product id's into an array for the search and output that list. Some of the tables are small, so i may as well make these into arrays for the site to use in general to reduce the sql overhead.

I was contemplating making a new table for the search engine with all the data in a single feed, updated hourly with a cron job or something like that.

My question is if anyone has any advice on doing this, especially about the idea of sorting optimising the sql to run efficiently.

Kind regards
#4

[eluser]esra[/eluser]
Are you using PHP4 or PHP5?

If PHP5, you might look at the two PHP incarnations for Search Engine Lucene (the original for Pear and the module in the Zend Framework). There is a thread on the forum, plus a wiki article (fairly sure) about using Zend Framework modules with CI. Some Zend modules will work, others do not. You might want to look into it.

For PHP4, you might take a look at the classes available on phpclasses.org.




Theme © iAndrew 2016 - Forum software by © MyBB