I was desperate to get tag search working, so I've worked it out myself. I used Orban's 0.1 "plug-in" version as a base, with Sphinx-0.9.8-rc2 on vBulletin 3.7.1. Only small changes were necessary to support tags.
I don't use prefixes in my forum, so the prefix implementation is incomplete. I just added the prefixes in the full-text index so they are searchable just like any other text in a thread or post. I would be happy to try to walk somebody (with basic PHP skills) through what I think is necessary to get it to work properly.
I have attached my versions of Orban's files. Here are the details of my changes:
Code:
In Orban's search_sphinx.php,
after:
#$vbulletin->GPC['prefixchoice']
add:
if (!empty($verified_tag ))
$cl->SetFilter('tagid', array($verified_tag['tagid']) );
This isn't required, but I prefer 'extended' mode so people can use quotes in searches to find phrases:
Replace:
if (!$vbulletin->config['Sphinx']['mode']) $vbulletin->config['Sphinx']['mode'] = 'SPH_MATCH_ALL';
With:
if (!$vbulletin->config['Sphinx']['mode']) $vbulletin->config['Sphinx']['mode'] = 'SPH_MATCH_EXTENDED';
In sphinx.config, I have made a number of changes.
- added tags and prefixes to the indexes
- changed post.visible=1 to post.visible > 0 so moderators can see deleted posts (bug fix)
- use a minimum word length of 1 (instead of 4). Sphinx can handle it without problem.
(Please excuse my new username. I haven't posted in this thread before, but I have been a member of vB.org for four years under a different username.)
And finally, thank you Orban! If you are around, turn on private messaging and I'll help however I can.