glicer / search
Autocomplete, search and browsing as-you-type
Installs: 54
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Language:JavaScript
Requires
- php: >=5.4
- symfony/console: 2.3.*
- symfony/filesystem: 2.3.*
- symfony/finder: 2.3.*
- symfony/stopwatch: 2.3.*
- symfony/yaml: 2.3.*
Requires (Dev)
- phpunit/phpunit: ~4.0
- symfony/process: 2.3.*
This package is not auto-updated.
Last update: 2024-11-09 18:46:49 UTC
README
A real-time full text search solution with javascript (client side) and php (server side)
Autocomplete, search and browsing as-you-type in real-time
It's working with
Check out the demo.
Feedback appreciated
Server Side
Import Data
Data must be in yaml format, some samples in tests/server/data
<?php use Symfony\Component\Console\Output\ConsoleOutput; use GlSearchEngine\GlServerEngine; $output = new ConsoleOutput(); $yamlFiles = [__DIR__ . "/data/web.yml", __DIR__ . "/data/web2.yml"]; //yaml files list to import in database $dbname = __DIR__ . "/data/web.db"; //database path $table = "web"; //prefix table name $fieldsFullText = ['title', 'tags', 'description', 'address', 'city']; //fields list to fulltext search $fieldsFilter = ['gps']; //fields list possibly used to filter $engine = new GlServerEngine($dbname, $output, true); $engine->importYaml( $table, $fieldsFilter, $fieldsFullText, $yamlFiles, function () use ($output) { //callback function to each import $output->write("."); } );
Service
Example of php file called by javascript client.
Configure Apache Server
Allow multiple requests to be sent over the same TCP connection
Header set Connection Keep-AliveClient side
Running Client/Server Tests
Launch from command line :
vendor\bin\phpunit
To Do
Ranking / Sorting
Licence
GNU 2
Contact
Authors : Emmanuel ROECKER & Rym BOUCHAGOUR