Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #581  
Old 05-31-2008, 09:17 PM
eoc_Jason's Avatar
eoc_Jason eoc_Jason is offline
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jah-Hools View Post
See - at 2 million posts search speed isnt a problem for me (so far) - what IS a problem is the forum members deep, deep unhappiness with the way the VB search works.. Google is the best way to search my forum (it handles 2 character content way better) so I am about to pull the trigger on Google Custom Business edition.. I wanted to make a last check to see if Sphinx would do the job better.. But all I can glean from these posts is 'use sphinx if VB search is slow' I don't see any raves about improved user functionality.. Does Sphinx simply improve speed for big forums and reduce the extra machines in a cluster of servers?

Its search functionality I am after.. Does Sphinx add functionality to the forum users experience - or just add speed?
One big problem with the stock vB code is that it likes to do a lot of post-filtering of the returned results. It happened way too often (to me and others) that searches where I know a keyword should appear (because I put the word in a specific place to do the test) vB will return "No results found" because it drops the score so low that it rejects it, even if it was the ONLY result...

Sphinx has it's own scoring system, and depending on how you set it up it can be extremely powerful. But if you want to gain the full benefit you will also need to probably peel through the search.php file and rip out some of the vB scoring so that it doesn't remove relevant results.

Also with sphinx it will return results in the same thread (or post) like view. So having results returned by date or a certain user or whatever is a lot more powerful than what google could probably do.
Reply With Quote
  #582  
Old 06-02-2008, 04:24 PM
rebelde rebelde is offline
 
Join Date: Jun 2008
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was desperate to get tag search working, so I've worked it out myself. I used Orban's 0.1 "plug-in" version as a base, with Sphinx-0.9.8-rc2 on vBulletin 3.7.1. Only small changes were necessary to support tags.

I don't use prefixes in my forum, so the prefix implementation is incomplete. I just added the prefixes in the full-text index so they are searchable just like any other text in a thread or post. I would be happy to try to walk somebody (with basic PHP skills) through what I think is necessary to get it to work properly.

I have attached my versions of Orban's files. Here are the details of my changes:
Code:
In Orban's search_sphinx.php,

after:
#$vbulletin->GPC['prefixchoice']

add:
 if (!empty($verified_tag ))
        $cl->SetFilter('tagid', array($verified_tag['tagid']) );


This isn't required, but I prefer 'extended' mode so people can use quotes in searches to find phrases:

Replace:
if (!$vbulletin->config['Sphinx']['mode']) $vbulletin->config['Sphinx']['mode'] = 'SPH_MATCH_ALL';
With:
if (!$vbulletin->config['Sphinx']['mode']) $vbulletin->config['Sphinx']['mode'] = 'SPH_MATCH_EXTENDED';



In sphinx.config, I have made a number of changes.
 - added tags and prefixes to the indexes
 - changed post.visible=1 to post.visible > 0 so moderators can see deleted posts (bug fix)
 - use a minimum word length of 1 (instead of 4).  Sphinx can handle it without problem.
(Please excuse my new username. I haven't posted in this thread before, but I have been a member of vB.org for four years under a different username.)

And finally, thank you Orban! If you are around, turn on private messaging and I'll help however I can.
Attached Files
File Type: txt sphinx.conf.080602.txt (3.9 KB, 185 views)
File Type: txt search_sphinx.php.080602.txt (25.1 KB, 148 views)
Reply With Quote
  #583  
Old 06-03-2008, 07:57 AM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks rebelde, adding prefixes to the full text index is a great idea, I don't know why I haven't considered this. Also re-enabled PMs
Reply With Quote
  #584  
Old 06-04-2008, 09:21 AM
ivanp ivanp is offline
 
Join Date: Sep 2007
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice job orban and rebelde! It works great.

I think this code in search_sphinx.php:
Code:
if (!$vbulletin->config['Sphinx']['host']) $vbulletin->config['Sphinx']['host'] = 'localhost';
should be changed to:
Code:
if (!$vbulletin->config['Sphinx']['host']) $vbulletin->config['Sphinx']['host'] = $vbulletin->config['MasterServer']['servername'];

Two questions:
1) Is there a fix to make wildcards work?
2) Is there a transliteration support for Sphinx?
Reply With Quote
  #585  
Old 06-04-2008, 12:03 PM
rebelde rebelde is offline
 
Join Date: Jun 2008
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm glad it is working for you.
Quote:
Originally Posted by ivanp View Post
1) Is there a fix to make wildcards work?
From what I can tell from the Sphinx docs, you need to add:
min_prefix_len = 3
prefix_fields = title (maybe more?)
enable_star = 1

I'm not sure where you add these lines, though. I would think that they go in:
index thread : post - first two
index threaddelta : post - first two
searchd - enable_star = 1

Let us know if you find out where they go, and if it slows searches much.

Transliteration? I'm not sure. Check the Sphinx docs.
Reply With Quote
  #586  
Old 06-05-2008, 10:31 AM
ivanp ivanp is offline
 
Join Date: Sep 2007
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/search.php?do=finduser&u=... is not working properly.

It returns either:

Quote:
Sorry - no matches. Please try some different terms. %1$s
or returns very old results.

--------------- Added [DATE]1212666226[/DATE] at [TIME]1212666226[/TIME] ---------------

Quote:
Originally Posted by rebelde View Post
e Sphinx docs, you need to add:
min_prefix_len = 3
prefix_fields = title (maybe more?)
enable_star = 1
I am afraid of this:

http://www.sphinxsearch.com/doc.html
Quote:
However, indexing prefixes will make the index grow significantly (because of many more indexed keywords), and will degrade both indexing and searching times.
Waiting to hear feedback if moderators really need this feature.
Reply With Quote
  #587  
Old 06-06-2008, 04:00 AM
BillP BillP is offline
 
Join Date: Nov 2001
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We are running the new plugin with 3.7.1

When one clicks on a username and chooses "Find More Posts By <user>", the following warning appears on the "Your search is in progress" page:
Quote:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/search_sphinx.php on line 160
Then it refreshes, and returns numerous errors followed by the results:
Quote:
Warning: strpos() [function.strpos]: Empty delimiter in [path]/includes/functions_search.php on line 829

Warning: strpos() [function.strpos]: Empty delimiter in [path]/includes/functions_search.php on line 829

Warning: strpos() [function.strpos]: Empty delimiter in [path]/includes/functions_search.php on line 829

Warning: strpos() [function.strpos]: Empty delimiter in [path]/includes/functions_search.php on line 829

Warning: strpos() [function.strpos]: Empty delimiter in [path]/includes/functions_search.php on line 829

Warning: strpos() [function.strpos]: Empty delimiter in [path]/includes/functions_search.php on line 829
Any ideas on how to fix this?
Reply With Quote
  #588  
Old 06-06-2008, 01:56 PM
rebelde rebelde is offline
 
Join Date: Jun 2008
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BillP View Post
When one clicks on a username and chooses "Find More Posts By <user>"
Quote:
Originally Posted by ivanp View Post
/search.php?do=finduser&u=... is not working properly.
I tested it, and have no trouble at all with these searches.
/search.php?do=finduser&u=1
/search.php?do=finduser&u=1&starteronly=1
It works properly and shows the threads in descending order for me.
Reply With Quote
  #589  
Old 06-06-2008, 02:53 PM
BillP BillP is offline
 
Join Date: Nov 2001
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rebelde View Post
I tested it, and have no trouble at all with these searches.
/search.php?do=finduser&u=1
/search.php?do=finduser&u=1&starteronly=1
It works properly and shows the threads in descending order for me.

Did you use the search_sphinx.php directly from the download on the first post of this thread, or have you edited it with fixes that orban (or others) have suggested along the way?

We aren't running any other hacks in the system. These ARE warnings, maybe it's just the warning vs. error setting in PHP and these can be ignored?
Reply With Quote
  #590  
Old 06-06-2008, 09:38 PM
DaiTengu DaiTengu is offline
 
Join Date: Nov 2005
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Turning off warnings is a cosmetic fix, but the underlying issues still exist.


Did you update your sphinx.conf with the new settings suggested here: https://vborg.vbsupport.ru/showpost....&postcount=541 ?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 12:33 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09061 seconds
  • Memory Usage 2,292KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (10)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete