vBulletin Mods

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

mute 19 Dec 2006 18:56

Hm. So all was going well, but out of the blue our subforum searches stopped working. If i don't specify a subforum, the searches work. If I do, I get an assertion failure in sphinxapi.php @ line 290 (with 0.9.7-rc2).

I ran into the problem on -rc1, and decided to upgrade to see if it had been fixed, but it has not. I'm a tad stumped.

Edit: I seem to have fixed it by adding a "$value = intval($value);" before the assert() in sphinxapi.php. Guess this is related to the assertion failures earlier, so much for not having to cast variables :)

orban 19 Dec 2006 19:07

Tried to do an intval() on the forumid?

amcd 19 Dec 2006 19:21

@mute, good that you solved the problem, but i would not edit sphinxapi.php

since more people are facing the same problem, let me post an easy to follow solution. this is what i did to solve the problem on my forums, after reading the conversation between alanjay and orban

in includes/sphinx.php, around line 44, change

from:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

around line 69, change

from
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

and lastly, around line 157, right at the end of the file, change

from
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


mute 19 Dec 2006 19:41

Thanks amcd, that is indeed a better solution. I've made the changes and all appears to be working well :)

ubuntu-geek 02 Jan 2007 15:21

Just out of curiosity.. Are people using the standard vb search or full text in conjunction with their sphinx implementations?

orban 02 Jan 2007 15:35

full text so vB doesn't populate its search tables (at least me, I just noticed that this is actually not mentioned in the guide)

ubuntu-geek 02 Jan 2007 15:40

great thanks.. :)

Orban have you updated to sphinx rc2 yet?

amcd 03 Jan 2007 02:43

orban, i think you should clearly mention this in the tutorial. if vb is not switched to fulltext, there will be hardly any benefit from sphinx. also, the fulltext indices should be dropped, otherwise mysql will keep updating them and waste time.

mute 03 Jan 2007 20:28

So, is there any hope to having sphinx handle searching for all of a users posts? I forget what we determined earlier in the thread. Despite sphinx being fast, I'm still seeing slowdowns related to doing the "find all posts by user" searches :(

orban 03 Jan 2007 22:32

I don't think Shodan (from sphinx) has implement keyword-less queries yet but he plans to afaik.

kmike 04 Jan 2007 07:58

You can emulate the search by user in sphinx by adding a fake unique keyword per each member in the mix (e.g. "_userid_12345"). Searching by this keyword will return all posts by the member with userid 12345.

ubuntu-geek 16 Jan 2007 13:51

I've noticed a few people talking about the sorting of searches being off. I am having the same issue, has anyone found a fix for it yet?

mute 16 Jan 2007 14:32

Quote:

Originally Posted by ubuntu-geek (Post 1160538)
I've noticed a few people talking about the sorting of searches being off. I am having the same issue, has anyone found a fix for it yet?

Not I. I can't say i've looked into it, but a magical fix would be awesome.

DigitalCrowd 18 Jan 2007 19:50

I think I figured out the problem, but not sure I know how to fix it at this very moment.

The sphinx.conf file that is being distributed in this thread builds the date_column as "dateline" for post index, and "lastpost" for thread index. I noticed the output from Sphinx is in proper order by dateline, but since the two indexes are not being given the same date source, then your threads will be out of order on search results when, I assume, that it groups the posts into the threads and the output displays the last post date of the thread and not the "post date" of the post that your search matched.

While you could fetch the lastpost date of a thread that is associated with the post and this way you use one date column unique across the indexes, my assumption is that unless you rebuild the full index (not deltas) constantly, that your searches will still be messed up.

We already know that when we say we want 1000 results and 7000 documents match, that we may only have 853 results, once all posts are grouped under specific threads.

I will have to think about this one.

Wait, hold on, things are coming to quickly...

Example:

You do a search on "Trees", and it finds 10 posts with the word "Trees" in it. For the sake of this discussion, "Trees" is only in one post in each thread. The results come back and order in DESC order, all the post's dateline.

Well, this is great, except, additional posts to those threads may have happened, and as such the search results are all out of order, because the search returns the dateline order, not the lastpost order of the associated thread.

This ALSO explains why when each of us first installed this and indexed our boards, that everything worked perfectly, because it was a brand new index. But, once you start building onto that index that is when things go astray.

I believe this is what is causing it all, but I might be missing something.

amcd 18 Jan 2007 20:13

DigitalCrowd, I think you have hit the nail right on the head. I rebuild my full index everyday, and my results are just slightly out of order. And the thread which are our of order are the ones which have been updated today, after the last rebuild.

So, how do we fix this problem? Once the search results have been received from sphinx, we then re-sort them by lastpost if the user has requested 'show results as threads'?


All times are GMT. The time now is 23:36.

Powered by vBulletin® Version 3.8.14
Copyright © 2022, 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.