"The PHPGnix is beta project this is not for production!"
The PHPGnix is a Class that will allow you to index texts(Full text search) without carry about database handler. PHPGnix goal is to do an Simple and Fast Search System. For index something you just need to do this:
include "gnix.php";
$gnix = new Gnix(array("db" => "phpgnix", "host" => "localhost", "user" => "root", "pass" => ""),MYSQL);
$gnix->install(); /* Install it just for the first time */
$texto['title 1'] = "This is a text for index";
$texto['title 2'] = "This is a text number 2 for index";
$gnix->Index($texto);
The actual databases supported is MYSQL and SQLITE (please contribute for others databases like postgresql).
To search you have to do something like this:
include "gnix.php";
$gnix = new Gnix(array("db" => "phpgnix", "host" => "localhost", "user" => "root", "pass" => ""),MYSQL);
$query = new Gnix($connstring,MYSQL);
$salida = $query->search('"web search" google OR altavista NOT msn');
The edit is not supported yet! But it will be soon
This has a slow performance for queries that has OR and I dont know why. All the words that is bettween " " is phrase.
Please people contribute to this project a better one!. There is too much that is missing Like NEAR command, a better ranking algorithm, the stopwords list, the stemming for another langs (http://snowball.tartarus.org/index.php), and too much.
Please Contribute to saddorNOTSPAM (AT) gmail (dot) com [remove the NOTSPAM].
Thanks.
When this project is optimize with your help! I will translate this project to C.
Thanks one more time to all. |