Advertisement:
GCWebhosting

Author Topic: Sphinx for multiple SMF's on the same server  (Read 392 times)

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,655
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Sphinx for multiple SMF's on the same server
« on: July 18, 2019, 08:29:57 AM »
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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,203
    • StoryBB/StoryBB on GitHub
Re: Sphinx for multiple SMF's on the same server
« Reply #1 on: July 18, 2019, 03:00:06 PM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,655
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Sphinx for multiple SMF's on the same server
« Reply #2 on: July 18, 2019, 07:34:15 PM »
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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,203
    • StoryBB/StoryBB on GitHub
Re: Sphinx for multiple SMF's on the same server
« Reply #3 on: July 19, 2019, 02:37:58 PM »
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)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,655
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Sphinx for multiple SMF's on the same server
« Reply #4 on: July 19, 2019, 05:00:52 PM »
Does the code currently work for SMF 2.1 too?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,203
    • StoryBB/StoryBB on GitHub
Re: Sphinx for multiple SMF's on the same server
« Reply #5 on: July 19, 2019, 05:03:43 PM »
Probably not, the search API had a substantial overhaul in 2.1.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,655
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Sphinx for multiple SMF's on the same server
« Reply #6 on: July 19, 2019, 05:20:10 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

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 580
Re: Sphinx for multiple SMF's on the same server
« Reply #7 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.


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,203
    • StoryBB/StoryBB on GitHub
Re: Sphinx for multiple SMF's on the same server
« Reply #9 on: July 19, 2019, 05:50:21 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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.