Attached is the patch for Sphinx 0.9.5 which adds two more group columns.
You'll have to have something like this in your sphinx.conf:
Code:
sql_query=SELECT postid, \
pagetext, post.title, forumid, \
IF(post.userid=0,99999999,post.userid) AS userid, \
post.threadid AS threadid, post.dateline AS dateline \
FROM post
.....
sql_group_column = forumid
sql_group2_column = userid
sql_group3_column = threadid
sql_date_column = dateline
The part with IF(post.userid=0) is needed because Sphinx doesn't like zero column values (you'll have them if a board has some posts by the guests or deleted users), so we replace them with an arbitrary high number (99999999) which is guaranteed not to happen in the real data.
sphinxapi.php supports two more grouping functions: SetGroup2(array) and SetGroup3(array).
So search.php will have to call $sphinx->SetGroups2($userids) when searching by user(s), where $userids is an array containing their userid's.
And similarly, $sphinx->SetGroups3(array($searchthreadid)) will be called when searching in a thread.