vBulletin Mods

The Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=127868

ALanJay 26 Oct 2006 14:23

Quote:

Originally Posted by orban
Yeah that's weird. Just call

SetTimestampRange

with SetTimestampRange ( intval ( ... ), intval ( ... ) );


Thanks - I ended up just forcing datecut with intval (see above) and leaving it like that as the other elements in the various palces SetTimestampRange are set don't seem to be causing an issue.

mute 26 Oct 2006 18:35

Orban, lookin good. I have mine up and running just in time for our upgrade tonight :)

One thing i had to change though -- I limit my search results to 500, and on line 101 of sphinxapi.php there is a

$this->_maxmatches = 1000;

This will throw an error if you try to request 1000 results via php from a searchd that is limited to less than 1000. I changed my sphinxapi to match and its all good :)

Just an FYI!

orban 26 Oct 2006 18:40

Cool, glad to hear it works :) I honestly didn't do much testing but the few things I tried seemed to work and it's just a few different function calls. And if something it wrong I sure get a notice here quickish :D

mute 26 Oct 2006 19:13

Edit: Nm! I forgot that i had sphinx pointed at a vb 3.5.2 database, not a 3.6.2 :)

orban 26 Oct 2006 19:22

Well, dateline is supposed to be the sql_date_column? I thought that was the case, but I guess it's not. Looks like all groups even the date one have the sql field as their name.

Edit: OOooo! This means we can also implement sort by userid and forumid!? (And all other sorting options but they will have a quite big delay...like if you update only every 24 hours they will be 24 hours old).

mute 26 Oct 2006 19:25

Eh, I'm not sure it is needed. Since my main site isn't 3.6 yet (tonight is the upgrade), I had my sphinx looking at my live data, and my vb install looking at a test db (with older data).

The dateline column on thread was added in 3.6, which is why I think it was broken. I'll know more tonight when we upgrade :)

Were you running into the dateline error on thread title?

orban 26 Oct 2006 19:30

I thought "dateline" was the internal name for whatever field you have defined as the sql_date_column. But it looks like that isn't the case. I wonder why there even still is an sql_date_column. Because the new SetSortMode() can take ANY column. This confused me a bit.

mute 26 Oct 2006 19:32

Ahh, you are right. I updated my sphinx.php and it seems better now.

orban 26 Oct 2006 19:35

It's still bugged. Lemme figure this out. When I fix one the other breaks. Haha.

mute 26 Oct 2006 19:36

Hm, getting something similar targeting a specific forum with an "entire posts" search:

Warning: assert() [function.assert]: Assertion failed in /sphinxapi.php on line 284
Query failed: searchd error: index 'vbpost': sort-by attribute 'lastpost' not found.

Again, could be my currently messed up setup, it is hard to tell until I get the upgrade done tonight :)

Edit: haha didn't see that something else was broken. I'll leave the testing to you hehe

kmike 26 Oct 2006 19:39

Quote:

Originally Posted by orban
I thought "dateline" was the internal name for whatever field you have defined as the sql_date_column. But it looks like that isn't the case. I wonder why there even still is an sql_date_column. Because the new SetSortMode() can take ANY column. This confused me a bit.

Because AFAIK Sphinx sorts by dateline even when requested sort is by another column - e.g. for the relevance you'll get results basically as ORDER BY relevance DESC, dateline DESC.

Also, better replace "docinfo = inline" with "docinfo = extern" if you have RAM to spare, according to sphinx.conf.dist. Check the relevant section.

orban 26 Oct 2006 19:45

Okay, I had to add a new variable (that gets modified by whether you search in threads or posts) and now a much nice sorting code block.

http://dragy.de/public/sphinx/sphinx.php.txt

I tried all four combinations so it must work now!? Did I say this before? ;)

Hmm, about the docinfo, gonna have a look. We're only gifted with 2GB RAM for our forums and in a few months we'll have 2 million posts. Not good. I'll make a note in the installation.

mute 26 Oct 2006 19:48

The box I'm running sphinx on has 2gb of ram (it is just a slave db server). MySQL has been using a ton of memory lately because we're slaving searches to it, but after we switch to sphinx tonight I think it'll even out a lot. I'm thinking that extern might be better (we have 25 million posts). I'm not entirely sure, but I guess I can try both ways w/o much reconfiguration :)

orban 26 Oct 2006 19:50

Quote:

Originally Posted by kmike
Also, better replace "docinfo = inline" with "docinfo = extern" if you have RAM to spare, according to sphinx.conf.dist. Check the relevant section.

( 1 + number_of_attrs )*number_of_docs*4 bytes

( 1 + 5) * 1.5 million posts * 4 bytes = 34 megabytes.

Might be worth keeping external, you're right.

I'm running everything on one box, so I'm kinda really short on ram, but 34mb seems to be doable. :D

mute 26 Oct 2006 20:10

Hm, 600mb for 25 million posts, I guess I'll give it a shot :)

So, we just rolled out our sphinx search. All is well, but some users are reporting a ton of warnings after clicking submit and before they get their results.

I'm not exactly what is causing it, but the error is:

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/sphinx.php on line 142

Looks as though $sphinx_conventry_id is not getting set on this line?

if (!can_moderate($docinfo['attrs'][$sphinx_can_moderate_forumid]) AND in_array($docinfo['attrs'][$sphinx_conventry_userid], $Coventry))

Any thoughts?


All times are GMT. The time now is 02:58.

Powered by vBulletin® Version 3.8.14
Copyright © 2021, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.