News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Sphinx for multiple SMF's on the same server

Started by Biology Forums, July 18, 2019, 08:29:57 AM

Previous topic - Next topic

Biology Forums

Just finished setting up Sphinx for my 2.0.x forum.

Curious if you'd have to setup a secondary config file, and a different index data, log, and bin path.

Thanks

Arantor

I don't think this was a scenario ever tested particularly well with the Sphinx API (either of them for SMF), but in theory there's no reason why you couldn't do that, just plug in each SMF's database as an index and make sure the search code only addresses the index it's meant to (as opposed to all which IIRC is the default).

I used to know a lot more about Sphinx but it's been a decade since I last really played with it; these days I'd tend towards ElasticSearch as it's somewhat easier to plug things into it and tweak how it runs but at serious scale (thousands of searches an hour), Sphinx wins on speed if its searching and ranking will do what you need.

Biology Forums

I don't think Elastic is free, which gives the edge to sphinx in that sector.

Anyway, all you do is create a secondary config file, and new folders (I labeled them xxx_2), and it works fine

Arantor

You can self-host ElasticSearch for free just fine (we do on some of the enterprise-grade customers I work with), it's only if you use Amazon's as-a-service or Elastic's own cloud offering where you need to actively be paying someone to use it. The only reason folks like XenForo charge for the connector is to weed out the headache support issues early.

But yeah, secondary config file = second index separate from the first. I just wasn't sure on the SMF end if the connector was smart enough not to try to query across indexes (something that under some circumstances is absolutely possible)

Biology Forums

Does the code currently work for SMF 2.1 too?

Arantor

Probably not, the search API had a substantial overhaul in 2.1.

Biology Forums

Quote from: Arantor on July 19, 2019, 05:03:43 PM
Probably not, the search API had a substantial overhaul in 2.1.

Argh, maybe in the future I suppose.

Out of curiosity, does SMF 2.1 RC3 work on all versions of PHP? Couldn't find a server requirement list anywhere

albertlast

Look at the readme.html:
http://htmlpreview.github.io/?https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/other/readme.html
How is ther performance diff between native(not custom) mysql fulltext search vs sphinx?

in postgres i added the native full text search for 2.1 which got as bonus,
that the search is aware of the language of the forum.


Arantor

Quote from: albertlast on July 19, 2019, 05:26:57 PM
Look at the readme.html:
http://htmlpreview.github.io/?https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/other/readme.html
How is ther performance diff between native(not custom) mysql fulltext search vs sphinx?

in postgres i added the native full text search for 2.1 which got as bonus,
that the search is aware of the language of the forum.

Sphinx used to be rated at hundreds or even thousands of times faster than MySQL, based on indexing multi-GB sized datasets that were dumps from Wikipedia, and the 'language' handling you'd typically do a bit more manually by declaring what character folding you cared about, so you could configure accent-caring or not.

I don't know if they added more fancy stuff since I last used it though.

Advertisement: