Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #406  
Old 29 Aug 2007, 19:20
mlx's Avatar
mlx mlx is offline
 
Join Date: Jan 2002
Originally Posted by orban View Post
I'm leaving this place if somebody wants to take over this thread and keep the guide up to date feel free to do so it's on page 26 I think. Bye.
So I guess it's OK to post our improved sphinx.php here. Thanks to orban and everyone else contributing to this thread for their work!

I have added some code to group the search results by threadid and to actually sort the results just like vBulletin's default search engine does.

I think the code should work fine with the config posted by orban on page 26. Let me know if you have any problems though.
Attached Files
File Type: php sphinx.php (6.4 KB, 106 views)
Reply With Quote
  #407  
Old 30 Aug 2007, 01:48
Rayn21 Rayn21 is offline
 
Join Date: Sep 2005
The code works wonderfully for most of my users, but for some users I get an empty searchd result back if - and only if - I am returning results as threads. (When searching for posts). When I use the search command line with the threadid as the groupby and the same index, I get results. I looked through the code, but I am not sure what would cause this particular issue. Have any ideas? I love the improvements.
Reply With Quote
  #408  
Old 02 Sep 2007, 10:09
Jon Jon is offline
 
Join Date: Mar 2002
Sphinx works fine on our forums when displaying results as threads. Displaying results as posts however returns an incomplete set of results, but only with terms that occur often (which is not hard with > 8M posts ). On top I get results with a match on the title only (why..?), and those are followed by older results with a match on posts. Recent posts seem to be missing in the result set.

Any hints on how to get the search to behave properly?
Reply With Quote
  #409  
Old 02 Sep 2007, 19:21
amcd amcd is offline
 
Join Date: Oct 2004
maybe your post delta is not being updated properly.
__________________
eXBii.com - Indian community
no XB no fun know XB know fun !
Reply With Quote
  #410  
Old 02 Sep 2007, 20:45
Jon Jon is offline
 
Join Date: Mar 2002
No, the indexer works fine. There could be up to hundreds of posts not included. Say I'm searching for a term, with a match on posts, displayed as posts, I first get 3 pages of matches on title, ranging from 2007 to 2005. After that I get matches on post, ranging from 2005 to 2003. Recent posts are nowhere to be found.
Reply With Quote
  #411  
Old 06 Sep 2007, 23:22
TECK's Avatar
TECK TECK is offline
 
Join Date: Dec 2001
Real name: Floren Munteanu
Good to see the thread is back! The need queries are still here... Hoooray!
__________________
Floren Munteanu
Axivo Inc.
Axivo Community - Visit the forums to find out more about us
Why Queued - My personal blog
Reply With Quote
  #412  
Old 07 Sep 2007, 00:59
TheComputerGuy's Avatar
TheComputerGuy TheComputerGuy is offline
 
Join Date: Oct 2001
Real name: Joe
I think I am going to give this a try. This should be awesome if it works.
__________________
I'll buy your forum!
Reply With Quote
  #413  
Old 15 Sep 2007, 02:00
MentaL's Avatar
MentaL MentaL is offline
 
Join Date: Jan 2003
Guys, Im really stuck, im trying to set this up and i just run into trouble, if anyone can gimme a good guide, thats great, but im stuck at this point.



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

__________________
RaGEZONE
Reply With Quote
  #414  
Old 15 Sep 2007, 06:28
amcd amcd is offline
 
Join Date: Oct 2004
Post your configuration file.

From what you posted, it appears that you have 2 problems, at least.
1. sphinx-data does not exist or the sphinx user does not have proper permissions to that directory.
2. sphinx is not able to connect to mysql because the connection parameters are not correct.
__________________
eXBii.com - Indian community
no XB no fun know XB know fun !
Reply With Quote
  #415  
Old 15 Sep 2007, 10:54
MentaL's Avatar
MentaL MentaL is offline
 
Join Date: Jan 2003
Originally Posted by amcd View Post
Post your configuration file.

From what you posted, it appears that you have 2 problems, at least.
1. sphinx-data does not exist or the sphinx user does not have proper permissions to that directory.
2. sphinx is not able to connect to mysql because the connection parameters are not correct.
Managed to fix that error but Now i have this error.


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

__________________
RaGEZONE
Reply With Quote
  #416  
Old 26 Sep 2007, 06:44
epheph epheph is offline
 
Join Date: Nov 2005
Hello, I have installed this mod and sphinx into a sizable vBulletin 3.6.5 installation (6M+ posts) and the performance so far in testing is very good. The only issue I have is that 'show as posts' doesn't work all the time. It seems if the search term has many results, I get

"Sorry - no matches. Please try some different terms."

But everything else works great (by user, etc). If I intentionally search for a term I know will be quite low, like misspellings, the "show by posts" works just fine. Any ideas?
Reply With Quote
  #417  
Old 21 Oct 2007, 21:44
kontrabass kontrabass is offline
 
Join Date: Feb 2002
Well I've finally got this up and going. Install went well, thanks to all the input here. Took me a while to figure out why a search term with thousands of matches returned only 180 vbulletin threads (1000 post matches gets distilled down into the 180 threads that hold them!). So I upped the max results to 2000 and get satisfactory result sets.

I was disappointed with not being able to do "phrase matches" - until I changed this line in sphinx.php:

$cl->SetMatchMode ( SPH_MATCH_ALL );

to

$cl->SetMatchMode ( SPH_MATCH_EXTENDED );

Extended mode enables all this stuff (including "phrase matching") :

http://www.sphinxsearch.com/doc.html#extended-syntax

(sorry if this is repeated)

However it seems that unless you can teach your users to use pipes and ampersands, "AND" and "OR" text boolean operators will not work

Edit: Actually, even pipes and apmersands don't work I guess ("The search term you specified (|) is under the minimum word length (3) and therefore will not be found. Please make this term longer."). Lol

Is everyone using this search doing ok without any boolean operators? Every search is treated as an "AND" search I guess.

Last edited by kontrabass; 21 Oct 2007 at 21:51.
Reply With Quote
  #418  
Old 23 Oct 2007, 05:08
BillP BillP is offline
 
Join Date: Nov 2001
Originally Posted by Jon View Post
No, the indexer works fine. There could be up to hundreds of posts not included. Say I'm searching for a term, with a match on posts, displayed as posts, I first get 3 pages of matches on title, ranging from 2007 to 2005. After that I get matches on post, ranging from 2005 to 2003. Recent posts are nowhere to be found.
We are getting strange results as well. Looking at results via sphinx "search" CLI shows me that there are hits in the right date range, but in our case we have lots of data since August, and spotty or missing data going back to 2003, light data back from there to 2001, and then a whole lot of data again. It's like the index is "light" for a few years.

=========

Bzzt! I forgot to update search.php after the last VB upgrade (it was on my to-do list, I just muffed it)

If you have weird data being returned, take a look at your search.php to see if you accidentally upgraded it and lost your edits!
__________________
Bill Plein

Last edited by BillP; 23 Oct 2007 at 05:38.
Reply With Quote
  #419  
Old 01 Nov 2007, 16:05
eoc_Jason's Avatar
eoc_Jason eoc_Jason is offline
 
Join Date: Dec 2001
Didn't want to see this thread die as I still heavy rely on Sphinx for my vB search. It's disappointing that the vB team *still* has not come up with a built-in solution for searching that is acceptable for large forums.

One bit of advice - The code in the vB search does a lot of weighting & filtering. I have many instances where I search for a specific word that is in a post, and doing a raw search I can find it, but after vB works its magic it will give a 'no results found'. So don't think something is broken, I guess technically it is, but it's 'by design'.

Anyhow, here's some bits of code that might help get your sphinx running a little smoother.

One thing you really should do is run the search daemon & indexer under a non-root user, I use 'sphinx'. If yours is different than simply adjust the files accordingly. you will probably need to make a few directories mentioned in the scripts below and have them owned by your user that sphinx is running as. (like for the lock file & log)

I run on Redhat / CentOS, here's my script that goes in the /etc/rc.d/init.d/ directory. I call it 'searchd'. Simply use 'chkconfig' to add it and have it start up when you system boots.


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

Second, here is my cron script. I made a directory called 'cron.quarterly' that runs every 15min. Similar to the cron.hourly, cron.daily, etc... You can do whatever. If you make that directory be sure to edit your /etc/crontab file accordingly too. I added a time-check so once a day sphinx will do a full-reindex, and it makes a lock file so if yours takes a long time to reindex you won't run into issues. Basically at 5am it will do a re-index. I chose that time because it's a low usage period for my forum and server. By default the cron.daily scripts run at 4am so you wouldn't want to do it then since everything else will be eating CPU cycles.


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

I also have my logs in their own /var/log/searchd/ directory, you set this in the sphinx config (most people probably just have them in the /var/log dir). Again that directory will need to be owned by the sphinx user that you use.


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

Oh, and for people wanting to know how to implement the sort_search_items(), here's some code. It goes in the includes/sphinx.php file.

At the end where there is the following:

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

Replace that with:


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

Be sure to leave the unset line at the very very bottom.


I'm about to make the upgrade to vB 3.6.8 whatever, and I'm running php 5.2.4, so I'll let you know how the upgrade goes. I want to look over everyones modifications and updates in this thread. Then I'll post some more files and stuff if necessary.
__________________
My Site: EXTREME Overclocking

Do not PM me with your iTrader problems or asking for the code. I will just delete your PM without reading it.

Last edited by eoc_Jason; 01 Nov 2007 at 16:26.
Reply With Quote
  #420  
Old 01 Nov 2007, 16:34
mute mute is offline
 
Join Date: Dec 2002
Thanks for that search results sort order fix, it seems to be working nicely.

All that really stands between this being a perfect solution is finding a way to handle all of the "Find all posts by user" type searches.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 07:34.

Layout Options | Width: Wide Color: