8000 GitHub - HiDAl/fsphinxphp: PHP Sphinx API extension for faceted search.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

HiDAl/fsphinxphp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FSphinx is a PHP port of the [fSphinx] 1 Python library, which extends the Sphinx API to easily perform faceted search.

What's faceted search?

Think of "filtering", "refining" or "drilling down". For example, when searching through a database of movie titles, you could get a list of clickable refinement options such as actors, directors, genre and year of release. As opposed to static hierarchical navigation, these options are calculated as you search so you don't end up following paths that return zero results.

How do I use this?

$fsphinx = new FSphinxClient();
$fsphinx->SetServer(SPHINX_HOST, SPHINX_PORT);
$fsphinx->SetDefaultIndex('movies');
$fsphinx->SetMatchMode(SPH_MATCH_EXTENDED2);
$fsphinx->AttachQueryParser(new MultiFieldQuery());
$fsphinx->AttachFacets(new Facet('actor'), new Facet('director'), new Facet('year'));
$results = $fsphinx->Query('action');
foreach ($results['facets'] as $facet) var_dump($facet);

To learn more, please refer to the [tutorial] 2 or the [documentation] 3.

Requirements

  • PHP 5.3+ (namespaces, anonymous functions)
  • Sphinx 1.10+ (string attributes)

For questions and suggestions, please email Chris Heng (hengkuanyen at gmail dot com).

About

PHP Sphinx API extension for faceted search.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0