Is there a free php search engine that doesn't use MySQL? - php

I've found several paid options and several options with PHP/MySQL, but does anyone know a free option for implementing a site search option on my page that doesn't use a MySQL database?

If you want to programme the search functionality yourself and you're using PHP, then you could try the Lucene component that's in Zend Framework. It'll create a file-based index for you, so no MySQL, and you can use a variety of search syntax on it. The index file should also be compatible with the Java implementation of Lucene.
http://framework.zend.com/manual/en/zend.search.lucene.html
http://framework.zend.com/manual/en/learning.lucene.html

Related

how to search the whole yii webapp?

I have a webapp build with Yii framework, I want to add a search box to make a search overall the website including the dynamic pages (data from database) and the static pages (data in the file itself).
When I searched for some extensions, I found Zend Lucene, but I didn't like its mechanism, so do you suggest any other extensions that can do such search methods? in case that there is no extension better than Lucene, could you give some tutorials and examples?
My suggestion is to use Solr. You then use the Solr's Data Importer Handler to import your data into a Solr/Lucene index. From your PHP code, you can use Solarium. It is a nice PHP client to communicate with Solr. I always do that for my work.

PostgreSQL, PHP - How to design a database search?

I need to design a search form and the code behind it.
I'm not very familiar with searches.
My table have the following aspect:
- Table_ads
site_name
ad_type
uri
pagetitle
name_ad
general_description_ad
age
country_ad
location_ad
zone_ad
Initially my idea was to do a search like google, we have a single text box and the button search, but I think this will be difficult. The other option is to build a search by fields(traditional search)
What do you think about this subject. What type of search should I do?
Best Regards,
PS: Sorry my English.
For "google-like" search it's best to use Full-Text Search (FTS) solution.
PostgreSQL 8.3 and newer has a built-in FTS engine, and it will let you do all querying in SQL. Example:
SELECT uri FROM ads WHERE fts ## plainto_tsquery('cereal');
See documentation -> http://www.postgresql.org/docs/current/static/textsearch.html and come back if you have more questions :-)
However, in-database FTS is several times slower than dedicated FTS.
So if you need better performance, you will have to build an index outside of database,
Here I would recommend Sphinx -> http://sphinxsearch.com/docs/current.html, Sphinx integrates smoothly with PHP. You feed it with documents (preferably, in form of special XML docset) and update the index on demand or with some scheduler. Then you do searching directly from PHP (not touching the database).
HTH.

Zend Lucene or sphinx?

I am building a system that has database operations that has millions of records.I am using Zend Framework in all part of my project.I wanted to use a search indexing technique but have you got any advice on this?which technique should i use?
Thanks in advance
Zend Lucene absolutely unrelevant for "millions of records".
Try to use sphinx http://sphinxsearch.com/docs/manual-1.10.html.
It has many usefull fratures, including clasterization to many servers; smart, customizable result ranking and much more. And it is really fast.
PHP API docs: http://www.php.net/manual/en/book.sphinx.php
There is C-version of PHP API http://pecl.php.net/package/sphinx
You absolutely don't want to use Zend Framework's Lucene implementation for that many records. Lucene is a great idea, just not a pure-PHP version.
Check out Solr and ElasticSearch, two Lucene-based search services that may fit your needs well. ElasticSearch is incredibly usable right out of the box with effectively zero configuration.

php search engines

Can anyone help me with a good list of php site search engines. I am thinking of implementing a google site search, but I would rather not pay for that and I would rather have as much control as I can over it.
Read through Roll your own Search Engine with Zend_Lucene.
The article is rather old though, so have a look at the ZF Reference Guide about Zend_Lucene too. Searching for Zend Lucene on Google should yield plenty useful results too.
Sphinx is pretty good, but it isn't written in PHP. It has got PHP libraries to interface with it though. You could also have a look at Zend_Search_Lucene from Zend Framework. Both of these make search indexes so you can do fast searches.
You can try the Zend Lucene implementation:
http://framework.zend.com/manual/en/zend.search.lucene.html
http://devzone.zend.com/article/91
You don't have to pay for Google Site Search and there's a small chance for much control means greater quality of results.
If your site is very specific you need to write you own code for search.
Sphinx is one of the best Open Source Search Engines. It has an excellent PHP API. Has very good community and forum too. PHP API for Sphinx comes embedded with the tar/zip file that you will download and with ease it can be embedded on top of your database. Has great vertical search capabilities. Its pretty simple to implement, try it out.
Here is a new PHP Search engine script, that can be implemented in any website, it is made with PHP 5.4+, MySQL, and Ajax.
https://sourceforge.net/projects/site-search-engine-php-ajax/
It crawls and indexes automatically the site pages, similar to Sphider.
It can uses PDO or MySQLi for connecting to MySQL database.

Search mysql database using php

I want to implement a powerful search engine for my ecommerce application. im using php and mysql as database. Can anyone guide me how to proceed? Is the FULL TEXT feature of MYSQL good for a large volume of data?
Thanks!
IMHO, the MySQL Full text engine is a really poor choice.
Firstly, the number of parameters to tweak the search is almost 0.
Secondly, from my experiencem it doesn't scale.
You might consider using
Sphinx
Lucene
Lucene is said to be the industry standard project. They have solr if you want to have a separate architecture.
They are far more advanced and perform better.
This should get you started, however you will have to modify or expand on the idea.
For the second part of your question, have a look at:
Pros & Cons of Full Text Search
Recently, for an app handling a huge amount of data, we have given up both MySQL FULL TEXT and Lucene to switch on PostgreSQL which has a much more powerful native FULL TEXT engine. At least, it was what the results of our investigations said.
Take a look at the Zend_Lucene from Zend_Framework and a new feature for mysql full text search here

Categories