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

H

I don't think that should affect anything as it isn't skipping actual data and should make another index of its own :)
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

pcigre

Don't have install button for mode in packages...
Sphinx for SMF      sphinx_0-9-7-rc2/smf_1-1-1      [ List Files ]  [ Delete ]

Is there version for 1.1.4?

Will changing version in xml help?

pcigre

OK, modified xml, instaled... and work almost fine... Speed is great, but id can't search for letters from my lanugage like: šđčćž

Normaln smf search works fine with those letters.

Fiery_Fenix

For search in other letters you need to change charset_table in /usr/local/etc/shpinx.conf
For example:
# 'sbcs' defaults for English and Russian
charset_table = 0..9, A..Z->a..z, _, a..z, \
   U+A8->U+B8, U+B8, U+C0..U+DF->U+E0..U+FF, U+E0..U+FF
or
# 'utf-8' defaults for English and Russian
charset_table = 0..9, A..Z->a..z, _, a..z, \
   U+410..U+42F->U+430..U+44F, U+430..U+44F
(from documentation for Sphinx - hxxp:sphinxsearch.com/doc.html#conf-charset-type [nonactive])

PS Modification works great for SMF 1.1.5 with >215k posts! Thanks!

pcigre

Anyone to post new mod/sphinx_config.php for new versions of sphinx?

Something like that

There's a small bug in the sphinx_config.php script. If the database password has a # in it, it needs to be escaped with a \. When the sphinx commands parse the config file, the # in a password is treated as the rest of the line being a comment. Escaping any # fixes the problem. And no, I'm not changing my password lol

Something like that

Okay, I've got it up and running now. Compared to MySQL's unindexed search, holy crap, fast! Thanks for this!

Something like that

For anyone who wishes to have sphinx start on reboot, here is my init.d script. Put it in /etc/init.d .

To make it start automagically, run 'update-rc.d sphinx defaults' (on Debian... may be different on other OSes).

Something like that

Quote from: pcigre on January 10, 2009, 05:52:39 AM
Anyone to post new mod/sphinx_config.php for new versions of sphinx?

No changes are necessary. Just modify the package-info.xml file for your version of SMF. Ignore the changes in the "Editing the sources of Sphinx" step.

rp8774

Will Sphinx 0.9.9-rc1 work or should I stick to 0.9.8.1?

Also, does SMF 2.0 have support for Sphinx and is there a mod for that?

Thanks

Gotenks

Can I use sphinx in shared server or it's only for vps and dedicated server?

Tiribulus

#31
Quote from: Phalloidium on January 16, 2009, 07:10:33 PM
Quote from: pcigre on January 10, 2009, 05:52:39 AM
Anyone to post new mod/sphinx_config.php for new versions of sphinx?

No changes are necessary. Just modify the package-info.xml file for your version of SMF. Ignore the changes in the "Editing the sources of Sphinx" step.

OK, Near as I can tell I got Sphinx working. I followed the instructions, everything appears to be go. I have the option selected in the CP now, I even grabbed your script. Search works and blazing fast. However (you knew that was comin right?) I've noticed an oddity. It appears selective in how it returns results depending on what you search for.

Example. I search for for rose or roses and I get the same results. Rose gets me rose and it's derivations. If I search for compost I get nothing. If I search for composts I get results.

EDIT:Do the search settings in the CP work when Sphinx is the engine. Meaning weighting mainly. What about forcing an index? Should I uncheck that now?

exxocet

Sphinx it's a great search engine. Especially useful for highly searched forums.
  Unfortunately, its pretty useless for forums updated frequently, it didn't support live indexing as it's a separate tool. Even with two indexes, one for main content and the other one for recent content you won't be able to add the new topics to the index sooner than 1 hour. If you set up an indexing  cron on every 10 minutes you'll kill the server faster than using SMF native search indexing.

Tiribulus

I would think that the content of many forums would make it not that much of an issue even if the search index was only updated once a day no?

I mean sure, realtime indexing is what everybody would want, but, especially once there's already a ton of content, does it really matter that much in most cases if the very latest posts aren't indexed for a little while.

exxocet

Sphinx 0.9.9-rc1 support phrase search. It's perfectly compatible with SMF.

Tristan Perry

Quote from: Phalloidium on January 16, 2009, 06:49:25 PM
Okay, I've got it up and running now. Compared to MySQL's unindexed search, holy crap, fast! Thanks for this!
Yep, it's so much quicker :) On my forums (centered around the Warhammer army "Tau"), searching for "Tau" used to take 30 seconds (it basically killed everything :P), but with Sphinx it takes around 4-8 seconds :)

exxocet

#36
Did you get the delta index to work or just rely on the main index daily refresh? I set delta index to refresh every 10 minutes, but doesn't index new content.
0-59/10 * * * * /usr/local/bin/indexer --config /usr/local/etc/sphinx.conf --rotate smf_delta_index

exxocet

#37
Gave me this error via e-mail:
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 38; use 'sql_attr_uint' 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_date_column' is deprecated in /usr/local/etc/sphinx.conf line 41; use 'sql_attr_timestamp' instead.
WARNING: 3 more warnings skipped.
indexing index 'smf_delta_index'...
collected 6 docs, 0.0 MB
sorted 0.0 Mhits, 100.0% done
total 6 docs, 2205 bytes
total 0.010 sec, 220500.00 bytes/sec, 600.00 docs/sec
total 3 reads, 0.0 sec, 11.5 kb/read avg, 0.0 msec/read avg
total 7 writes, 0.0 sec, 1.0 kb/write avg, 0.0 msec/write avg
WARNING: access denied to PID 26499.
WARNING: indices NOT rotated.


I've CHMOD all paths to Sphinx index 777, but no good.
It's possibly to happen because httpd and sphinx were started under different users? What can I do?

Thank you

exxocet

Quote from: Phalloidium on January 16, 2009, 07:09:06 PM
For anyone who wishes to have sphinx start on reboot, here is my init.d script. Put it in /etc/init.d .

To make it start automagically, run 'update-rc.d sphinx defaults' (on Debian... may be different on other OSes).

Very useful script, thank you.
To set it start automatically on RedHat / CentOS, run the following

to add the service:
chkconfig --add sphinx

to check if running:
chkconfig --list sphinx

You may also use ntsysv console to set the services:
ntsysv

moder

In the topic is placed Mod for version Sphinx 0-9-7-rc2. Now the actual version 0.9.9-rc2.
Who has newer version a Mod for SMF?

Advertisement: