News:

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

Main Menu

Install Sphinx Search?

Started by keptang, November 01, 2007, 03:27:23 PM

Previous topic - Next topic

keptang

Anyone know how to implement Sphinx search on SMF?
http://www.sphinxsearch.com/ [nofollow]


Have been searching all over the web without results.

TIA!

Kindred

try using search on the site, next time?
(first result when searching for "Sphinx" on the community.
http://www.simplemachines.org/community/index.php?topic=127672.0
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

keptang

I have tried the search and seen that search result, however, I cannot get into that specific thread.

Everytime the site gives me the following message:

An Error Has Occurred!
The topic or board you are looking for appears to be either missing or off limits to you.


So it's hidden in some secret cave?

keptang

Sorry, not in a search result, I saw the link in another thread.

But I don't have access to that forum for some reason, big forums or what it is called.

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

keptang

Anything I can do to get the information?

Bribe you?  ;)

Kindred

well, it's not my mod package to distribute...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

keptang

So you don't want to help (or isn't allowed to) with any information on how to do this.

Can you let me know who is the maintainer of the package so I can contact this person?

H

Hi keptang,

I've forwarded your query to the relevant people. Hopefully they'll respond shortly
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

keptang


H

Hi Keptang,

It was decided to release this mod (previously we supplied it only to those in the Big Boards section which we grant access to once you've got a forum with 750k+ posts).

QuoteSMF has always considered search as one of the most important features. Especially when forums grow larger, search becomes more and more important.

Until now, SMF supported two types of indexes: fulltext (using MySQL's own indexing system) and custom (using an index created by SMF and stored on the database). Though for many forums one of these indexes is sufficient, the larger the forum gets, the harder it gets to query the indexes. Not only are there limits to what it can reasonably find within a second, a search query also puts pressure on the database by using resources and locking tables.

With this in mind, Andrew Aksyonoff started his own engine, outside of MySQL: Sphinx (www.sphinxsearch.com). This engine runs as a separate deamon process and provides query results to applications like PHP. A scheduled task retrieves the data from the database and rebuilds the indexes. This engine is fulltext specialized and returns results often a thousand times faster than MySQL.

Impressed as we were with these results, we immediately embraced the technology to see what it could do for SMF. We dived into it, created a script to get the configuration right and updated SMF to support the Sphinx index. Ben's Red and White Kop with 2,4 milion messages was the ultimate test. Now that we've got it working there (ask Ben about the results, or try it yourself on his forum), we'd like to share the code with the group that's probably needing it the most: the big forum administrators.

Based on your feedback we will improve the scripts and eventually have Sphinx built-in as feature in SMF.

A few notes:
  • Please remember that the attached files are still in beta!
  • You'd need root access and a few basic admin skills (though we tried to describe the install process in detail)
  • The attached file sphinx_config.php contains detailed instructions on how to install Sphinx search for SMF. The script needs to be run from SMF's base dir and SSI.php needs to be present in that same directory.
  • Installing and configuring Sphinx search will take about 10-20 minutes (the indexing probably less! 8))
  • Sphinx can currently only be used in combination with SMF 1.1 RC3 the SMF 1.1 series
  • Sphinx does currently not support phrase search. SMF's search engine will break phrases up into words.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

keptang

Thanks a lot H! That worked great :)

H

Glad to hear it worked for you! :D
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

pcigre

Is there a version for SMF 1.1.4 and Sphinx 0.9.8-rc1?

Ben_S

The one above will work fine, just ignore any changes sphinx_config.php suggests making to the sphinx files before compiling.
Liverpool FC Forum with 14 million+ posts.

pcigre

Just to be sure that I understand you clear.

I can use sphinx_config.php  from this topic and latest 0.9.8-rc1?

Ben_S

Liverpool FC Forum with 14 million+ posts.

pcigre

I can't find and of search/find lines in Sphinx-0.9.8-rc2 src/sphinx.cpp file :(. Will there be sphinx_config.php  for latest version?

Authors say:

This version is strongly recommended instead of older releases such as 0.9.7.

...

H

Quote from: Ben_S on March 26, 2008, 09:39:46 AM
The one above will work fine, just ignore any changes sphinx_config.php suggests making to the sphinx files before compiling.

:)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

pcigre

#19
I got this message after running
# indexer --config /usr/local/etc/sphinx.conf --all
Sphinx 0.9.8-rc2 (r1234)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file '/usr/local/etc/sphinx.conf'...
WARNING: key 'strip_html' is deprecated in /usr/local/etc/sphinx.conf line 10; use 'html_strip (per-index)' instead.
WARNING: key 'sql_group_column' is deprecated in /usr/local/etc/sphinx.conf line 39; use 'sql_attr_uint' instead.
WARNING: key 'sql_group_column' is deprecated in /usr/local/etc/sphinx.conf line 40; use 'sql_attr_uint' instead.
WARNING: key 'sql_group_column' is deprecated in /usr/local/etc/sphinx.conf line 41; use 'sql_attr_uint' instead.
WARNING: key 'sql_date_column' is deprecated in /usr/local/etc/sphinx.conf line 42; use 'sql_attr_timestamp' instead.
WARNING: 2 more warnings skipped.
indexing index 'smf_base_index'...
collected 248249 docs, 58.4 MB
sorted 9.6 Mhits, 100.0% done
total 248249 docs, 58379427 bytes
total 17.275 sec, 3379421.83 bytes/sec, 14370.44 docs/sec
indexing index 'smf_delta_index'...
collected 1 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 1 docs, 252 bytes
total 1.682 sec, 149.82 bytes/sec, 0.59 docs/sec
distributed index 'smf_index' can not be directly indexed; skipping.


searchd --config /usr/local/etc/sphinx.conf
Sphinx 0.9.8-rc2 (r1234)
Copyright (c) 2001-2008, Andrew Aksyonoff

using config file '/usr/local/etc/sphinx.conf'...
WARNING: key 'strip_html' is deprecated in /usr/local/etc/sphinx.conf line 10; use 'html_strip (per-index)' instead.
WARNING: key 'sql_group_column' is deprecated in /usr/local/etc/sphinx.conf line 39; use 'sql_attr_uint' instead.
WARNING: key 'sql_group_column' is deprecated in /usr/local/etc/sphinx.conf line 40; use 'sql_attr_uint' instead.
WARNING: key 'sql_group_column' is deprecated in /usr/local/etc/sphinx.conf line 41; use 'sql_attr_uint' instead.
WARNING: key 'sql_date_column' is deprecated in /usr/local/etc/sphinx.conf line 42; use 'sql_attr_timestamp' instead.
WARNING: 2 more warnings skipped.


Will this make any problem?


Advertisement: