2017 © Pedro Peláez
 

library sphinxql

Simple library for work with SphinxQL Api ( uses mysqli php extension )

image

rpsl/sphinxql

Simple library for work with SphinxQL Api ( uses mysqli php extension )

  • Tuesday, July 15, 2014
  • by Rpsl
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,527 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 11 % Grown

The README.md

SphinxQL

Simple library for work with SphinxQL Api ( uses mysqli php extension ), (*1)

See SphinxQL specification, (*2)

Example:

$sphinxql = new SphinxQL(); $query = $sphinxql->newQuery(); $query ->addIndex('my_index') ->addField('field_name', 'alias') ->addField('another_field') ->addFields( array( array('field' => 'title', 'alias' => 'title_alias'), array('field' => 'user_id') ) ) ->search('some words to search for') // string (is given directly to sphinx, so can contain @field directives) ->where('time', time()-3600, '>', FALSE) // field, value, operator='=', quote=TRUE ->whereIn('tags_i_need', array(1, 2, 3), 'all') ->whereIn('tags_i_do_not_want', array(4, 5, 6), 'none') // field, array values, type='any' ->whereIn('tags_i_would_like_one_of', array(7, 8, 9), 'any') // field, sort='desc' ->order('@weight', 'desc') // defaults are 0 and 20, same as the sphinx defaults ->offset(10)->limit(50) // option name, option value ->option('max_query_time', '100') ->groupBy('field') // sphinx-specific, check their docs ->in_group_order_by('another_field', 'desc'); $result = $query->execute(); // get stats $stats = $sphinx->stats();
Example with RT Index:
$sphinxql = new SphinxQL();

$result = $sphinxql->query('
    INSERT INTO realtime_index
        (id, title, content)
    VALUES
        ( 1, "title news", "content news" )
    '
);
Install with composer:
{
    "require": {
        "rpsl/sphinxql": ">=1"
    }
}

The Versions

15/07 2014

dev-master

9999999-dev https://github.com/Rpsl/SphinxQL

Simple library for work with SphinxQL Api ( uses mysqli php extension )

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by Avatar Rpsl

database sql search mysql sphinx sphinxql

15/07 2014

v1.0.3

1.0.3.0 https://github.com/Rpsl/SphinxQL

Simple library for work with SphinxQL Api ( uses mysqli php extension )

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by Avatar Rpsl

database sql search mysql sphinx sphinxql

15/07 2014

v1.0.2

1.0.2.0 https://github.com/Rpsl/SphinxQL

Simple library for work with SphinxQL Api ( uses mysqli php extension )

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by Avatar Rpsl

database sql search mysql sphinx sphinxql

01/10 2013

v1.0.1

1.0.1.0 https://github.com/Rpsl/SphinxQL

Simple library for work with SphinxQL Api ( uses mysqli php extension )

  Sources   Download

Apache-2.0

The Requires

  • php >=5.3.0

 

by Avatar Rpsl

database sql search mysql sphinx sphinxql