[Beta] Sphinx search for phpBB 1.0.beta2

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment!
Anti-Spam Guide
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by Lumpy Burgertushie »

I would suggest installing a test board and testing it out to see.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
kdxrider
Registered User
Posts: 33
Joined: Sun Apr 22, 2012 1:53 pm

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by kdxrider »

For anyone interested, I was able to get this working on shared hosting. I used figvam's fork (THANK YOU!). As long as you have shell access, you can compile and install to your home directory, like so...

Code: Select all

$ wget http://sphinxsearch.com/downloads/accept.php?file=sphinx-2.0.8-release.tar.gz
$ tar -xf sphinx-2.0.8-release.tar.gz
$ cd sphinx-2.0.8-release
$ ./configure --prefix=$home
$ make
$ make install
This will install the files to your home directory. When you make the config/data directories, make sure you know the location so you can input them into the ACP. I had to check in the control panel to get the absolute path to my files. This will vary if you're on shared hosting services. This mod has reduced my CPU usage considerably, and stopped CPU throttling from the hosting provider due to the search function. Nifty! Thanks to everyone in this thread for all the great info!
kdxrider
Registered User
Posts: 33
Joined: Sun Apr 22, 2012 1:53 pm

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by kdxrider »

Anyone still using this? It's quite awesome when it works. My problem has been that the plugin seems to do a poor job of starting/stopping searchd to merge indexes. It gets hung, and search is lost. Re-indexing gets it going again for a while, and then it crashes again. I turned off automatically run sphinx in the ACP, and start the process manually using --config to point it to sphinx.conf. Then a cron job calls indexer every 15 minutes. This so far is the best solution I can come up with to keep it running. However, if searchd crashes, I have no method of re-starting it. Have to check and then issue command manually. I was thinking of putting a --stop and then running indexer and then issuing a start. Indexing only takes a few seconds anyway. The real problem with my solution is the delta index does nothing. So search is not instant, rather it syncs every 15 minutes.
t.sodano
Registered User
Posts: 4
Joined: Thu Jul 25, 2013 12:24 am

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by t.sodano »

Hello,

I'm attempting to install sphinx full text search using sphinx-for-phpbb (https://github.com/phpbb/sphinx-for-phpbb),

To start the board is running 3.0.11 and I installed sphinx 0.9.8.1 on the server.

I copied over the plugin files:

- root/includes/functions_sphinx.php
* To: includes/functions_sphinx.php
- root/includes/sphinxapi-0.9.8.php
* To: includes/sphinxapi-0.9.8.php
- root/includes/search/fulltext_sphinx.php
* To: includes/search/fulltext_sphinx.php
- root/language/en/mods/fulltext_sphinx.php
* To: language/en/mods/fulltext_sphinx.php

When I login to APC and check 'GENERAL' -> 'SERVER CONFIGURATION' -> 'Search Settings' for the plugin, sphinx is no where to be found.. I've tried many different steps but still can't get it to take.. any ideas? thanks in advanced!
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by Oyabun1 »

Do you use British English en in the ACP? If not you will need to copy the language/en/mods/fulltext_sphinx.php file to whichever language you use.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
t.sodano
Registered User
Posts: 4
Joined: Thu Jul 25, 2013 12:24 am

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by t.sodano »

Hey Oyabun1, thanks for the response, current language is set to 'British English' via 'GENERAL' -> 'Board configuration' -> 'Default language' = British English
t.sodano
Registered User
Posts: 4
Joined: Thu Jul 25, 2013 12:24 am

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by t.sodano »

Just an update.. I did a default install on another box using phpBB 3.0.11 and did the same steps and uploaded the sphinx plugin files and it works no problem..

On the live server there isn't any heavy modifications, just automod, tapatalk, and a modified rockettheme.. could any of these plugins or theme cause a conflict with sphinx-for-phpbb?
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by Oyabun1 »

Tapatalk seems to cause other problems for some boards, so I would suggest starting there.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
Fisch.666
Registered User
Posts: 232
Joined: Sat Jul 30, 2005 10:58 am

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by Fisch.666 »

Hi,

*Edit*
Seems this key is also used in phpBB-3.1-dev so i've reported an bug for this at the bugtracker:

http://tracker.phpbb.com/browse/PHPBB3-11938
*Edit*

just upgraded to the current Sphinx 2.1.2 stable and this API from figvam's fork still works without a problem. However there are now some deprecated warnings in the logfiles:
WARNING: key 'sql_attr_str2ordinal' is deprecated in /etc/sphinxsearch/sphinx.conf line 39; use 'sql_attr_string for sorting' instead.
Line 39 matches this part of the config file:
sql_attr_str2ordinal = post_subject
Don't know if i just can change this line to:
sql_attr_string = post_subject
Anyone familiar with such changes?

Thanks in advance for a reply.
Fisch.666
Registered User
Posts: 232
Joined: Sat Jul 30, 2005 10:58 am

Re: [Beta] Sphinx search for phpBB 1.0.beta2

Post by Fisch.666 »

Hi,

seems this is easy to fix. The changes in here should be enough to fix that issue:

https://github.com/phpbb/phpbb/pull/2094/files
Locked

Return to “[3.0.x] MODs in Development”