MyBB Community Forums

Full Version: Sphinx search
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hello,

It is my understanding that, if you configure and install the Sphinx search correctly, and then install the MyBB plugin, then the 'search.php' opts to use this system instead of MySQL 'fulltext' (or whichever you selected before).

Does this mean that the 'View New Posts' and 'View Today's Posts' pages also take advantage of the Sphinx search option? Would it also mean other search types use Sphinx, such as 'find all posts'?

I do not think this is true, particularly given the indexing options (in most cases, this would not be 'real time'). Is the normal to have a source indexed periodically (cron, or similar)?

My understanding is either, wrong, slightly skewed, or correct.

My good wishes,

R.
Sphinx is only used when the "do_search" action is provided. Typically this is directly from the main search page or the search box in the header. It does not apply to the search thread, get new, get today, find user posts, etc.

Since the get new and get today are simple searches based solely on forum permissions and a date stamp, Sphinx is of no value there and the results are not impacted by the time delay of the backend delta update/indexing of Sphinx

Sphinx is typically updated once a day, but the cron can be setup to run as often as you feel is necessary without burdening the server.
Thanks for the reply, pavemen.

I have just configured this, installed the plugin, and then indexed correctly.

Now, when searching, I get the following error, or a similar one:

Quote:SQL Error:
1364 - Field 'keywords' doesn't have a default value

Query:
INSERT INTO mybb_searchlog (sid,uid,dateline,ipaddress,threads,posts,querycache,resulttype) VALUES ('ae2315a715b9abb13779bff8739029e1','3','1373383038','82.14.0.2','20783,544,564,4221,5342,5354,5476,5666,5962,6287,6294,7926,7927,8222,9662,9830,10155,10340,10819,11480,12035,13092,13137,13370,14474,14475,14694,15242,16329,16967,17472,17532,17573,18763,19193,20441,21245,21806,21870,22446,22595,24121,24125,24225,24287,24512,24939,25182,25348,25551,25684,25699,25708,25742,26019,26227,26312,26598,26608,26732,26779,27916,28034,28514,28661,29816,29854,30389,31135,31143,31985,32492,32854,32975,32992,33033,33792,34615,26,32,36,50,51,55,56,61,64,79,84,88,91,93,98','','threads')

Just an update to this, I managed to correct this. The error no longer shows.

I dropped the table 'mybb_searchlog' and recreated it using the following command:

Quote:CREATE TABLE mybb_searchlog (
sid varchar(32) NOT NULL default '',
uid int unsigned NOT NULL default '0',
dateline bigint(30) NOT NULL default '0',
ipaddress varchar(120) NOT NULL default '',
threads longtext NOT NULL,
posts longtext NOT NULL,
resulttype varchar(10) NOT NULL default '',
querycache text NOT NULL,
keywords text NULL,
PRIMARY KEY (sid)
) ENGINE=MyISAM

Could someone advise me if this might produce errors later?
should be okay, but normally you need to have a search term of a minimum length. did you set your minlength to 0?
Well, my setting for minimum search length in Admin CP is '3', but the plugin overrides the setting to '2'. (I mean, I haven't changed it to zero)

And I just want to mention, I have noticed no results being returned if I search for a single significant keyword in only one forum. I wasn't sure why this might happen because it is a search which should yield results.
which version of the plugin are you using? what version of Sphinx and what directions did you follow to install/setup Sphinx?
Quote:which version of the plugin are you using? what version of Sphinx and what directions did you follow to install/setup Sphinx?

Version 1.0.2, which I downloaded from here: http://www.communityplugins.com/forum/sh...hp?tid=343

I could only follow those instructions so far, because I'm using a Windows server.

I do sometimes get results from running a 'search x' command, whereas, if I did the same from the forum I get no results.

I have it set-up to refresh the indexes:

#run indexer twice weekly
D:\sphinx\bin\indexer.exe --all --rotate

#run indexer daily and rotate logs
D:\sphinx\bin\indexer.exe --merge mybb_search_posts_main mybb_search_posts_delta --rotate
okay, just checking if you were using the original Sphinx from Ryan or my updated one.

I have been working today on updating several parts of both the plugin and the Sphinx config file. I am waiting for some feedback before moving on and publishing the new stuff.

Labrocca has reported that the delta index is not being used when he searches, though the APi supports it. Perhaps that is your issue.

He and I need to debug some more when he has time to test for me (given his resource needs, I am trying to make it all work for him so it should then work for everyone else, in terms of performance).
Ta - thanks for possible upcoming updates.

R.
I was wondering if there was an update to the progress of the Sphinx search plugin.

Thanks,
Pages: 1 2