2017 © Pedro Peláez
 

library search

Autocomplete, search and browsing as-you-type

image

glicer/search

Autocomplete, search and browsing as-you-type

  • Saturday, October 24, 2015
  • by emmanuelroecker
  • Repository
  • 1 Watchers
  • 2 Stars
  • 39 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

js-php-real-time-search (in progress)

A real-time full text search solution with javascript (client side) and php (server side), (*1)

Autocomplete, search and browsing as-you-type in real-time, (*2)

Sample Search, (*3)

It's working with, (*4)

Check out the demo.

Feedback appreciated, (*5)

Server Side

Import Data

Data must be in yaml format, some samples in tests/server/data, (*6)

    <?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., (*7)

Configure Apache Server

Allow multiple requests to be sent over the same TCP connection, (*8)

Header set Connection Keep-Alive , (*9)

Client side

Example of use, (*10)

Running Client/Server Tests

Launch from command line :, (*11)

vendor\bin\phpunit

To Do

Ranking / Sorting, (*12)

Licence

GNU 2, (*13)

Contact

Authors : Emmanuel ROECKER & Rym BOUCHAGOUR, (*14)

Web Development Blog - http://dev.glicer.com, (*15)

The Versions

24/10 2015