Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 4de520634b
Fetching contributors…

Cannot retrieve contributors at this time

file 29 lines (29 sloc) 1.141 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
<?php
class Search
{
  function query($query,$index,$offset=0)
  {
    require_once(DIR."lib/sphinx/sphinxapi.php");
    $sphinx = new SphinxClient();
    $sphinx->setServer(SPHINX_HOST,SPHINX_PORT);
    $sphinx->SetLimits($offset,100,10000000);
    $sphinx->SetMatchMode(SPH_MATCH_EXTENDED);
    $sphinx->SetSortMode(SPH_SORT_ATTR_DESC,'date_posted');
    $res = $sphinx->Query($query,$index);
    return $res;
  }
  function insert($type,$doc) { return true; }
  function delete($type,$id) { return true; }
  function thread_insert($data,$id) { return true; }
  function thread_post_insert($data,$id) { return true; }
  function message_insert($data,$id) { return true; }
  function message_post_insert($data,$id) { return true; }
  function thread_update($data) { return true; }
  function thread_post_update($id) { return true; }
  function message_update($data) { return true; }
  function message_post_update($data) { return true; }
  function thread_delete($id) { return true; }
  function thread_post_delete($id) { return true; }
  function message_delete($id) { return true; }
  function message_post_delete($id) { return true; }
}
Something went wrong with that request. Please try again.