Go Back   vb.org Archive > Community Discussions > Forum and Server Management
  #421  
Old 11-02-2007, 04:58 PM
mute mute is offline
 
Join Date: Dec 2002
Location: Phoenixville, PA
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone else had any luck with making Sphinx search for threads started and all posts by username?

I found this thread yesterday, but it seems really broken, at least I can't get it to return the same results.

https://vborg.vbsupport.ru/showthread.php?t=138668
Reply With Quote
  #422  
Old 11-02-2007, 11:23 PM
eoc_Jason's Avatar
eoc_Jason eoc_Jason is offline
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

IIRC, all posts by user should use userid / threadid / postid and those should be indexed? Or do you mean searching for a phrase by a particular user? If you elaborate I can look into it more. I need to do some tweaking on my sphinx, definitly when I do my vB upgrade and I want to make it more transparent (or even better) than the default vB search.
Reply With Quote
  #423  
Old 11-03-2007, 03:29 PM
mute mute is offline
 
Join Date: Dec 2002
Location: Phoenixville, PA
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I mean tossing the searches done via the advanced search page "Find all posts by user" or "Find all threads started by user" to Sphinx. Under the current incarnation those still hit MySQL.
Reply With Quote
  #424  
Old 11-04-2007, 11:39 PM
weeno weeno is offline
 
Join Date: Jan 2002
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for everyone involved. I appreciate the info. Especially, eoc_Jason. Those scripts saved me a lot of time.

I had to recreate much of the final sphinx.php file from the original file and the followup posts. So I thought I'd post my final edit so people can build on it.

I took the sphinx.php file from orban
https://vborg.vbsupport.ru/showpost....&postcount=387

Applied these changes:

sort_search_items changes from the bottom of the post by eoc_Jason

Fixed a Problem with asserts in sphinxapi.php

Added only the 64-bit Unpack fix detailed here. If you aren't on the 64-bit system, you prob can remove this function. I didn't add/change the rest of ALanJay's changes as I wasn't sure what they were for.

One problem for was the Coventry variable that seems to be causing causing errors:

Quote:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /includes/sphinx.php on line 125
that didn't seem to affect the search results. NOTE: I added error_reporting(0) as did mute at the beginning to simply surpress these errors as I didn't find another solution. If anyone has a solution for this, let me know. If you are testing this script out, you should remove that line to make sure it works before you surpress errors.

I didn't use

this code by mlx because I wasn't sure exactly what was added.

sphinxapi.php ignoring max matches limit set in sphinx.conf fix - again, wasn't sure if I needed to use it at the time.

config

my config is PHP 5.2.4 for php servers. Centos 5 64-bit for mysql. vbulletin 3.6.7.

arn
Attached Files
File Type: php sphinx _weeno.php (7.8 KB, 36 views)
Reply With Quote
  #425  
Old 11-05-2007, 06:53 AM
Jon Jon is offline
 
Join Date: Mar 2002
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by weeno View Post
Thanks for everyone involved. I appreciate the info. Especially, eoc_Jason. Those scripts saved me a lot of time.

I had to recreate much of the final sphinx.php file from the original file and the followup posts. So I thought I'd post my final edit so people can build on it.
[...]
Thanks! This helped us get rid of our problems with missing posts.
Reply With Quote
  #426  
Old 11-05-2007, 12:10 PM
Spinball's Avatar
Spinball Spinball is offline
 
Join Date: Feb 2002
Location: Telford, England
Posts: 705
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am in the UK and I need to get Sphinx running ASAP.
I've had a read of this thread but I'm finding it pretty baffling. I have reasonable MySQL and PHP skills but leave the server and PHP/MySQL setup well alone.
it's 14:10 here right now and my host will be around later to help with the install.
There's $100 / ?50 in it for someone who can hand-hold me through the installation today onto www.avforums.com.
Any takers?
Reply With Quote
  #427  
Old 11-05-2007, 02:35 PM
eoc_Jason's Avatar
eoc_Jason eoc_Jason is offline
 
Join Date: Dec 2001
Location: Houston, TX
Posts: 493
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any details on the unpack function? I looked on several pages but I can't find it. I've got a site running spinx that is 64bit, but IIRC they aren't using the unpack and aren't running into issues. What problems were people having?

Oh, about the other post on searching by user... As long as there isn't any search words (just a username) it should use the numeric indexes. It's been a while since I've peeled through the search code though, I'll try to look over it one of these days and see what can be done. I'm not sure if the code works if you put in a search term AND username.
Reply With Quote
  #428  
Old 11-05-2007, 03:40 PM
mute mute is offline
 
Join Date: Dec 2002
Location: Phoenixville, PA
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by eoc_Jason View Post
Is there any details on the unpack function? I looked on several pages but I can't find it. I've got a site running spinx that is 64bit, but IIRC they aren't using the unpack and aren't running into issues. What problems were people having?

Oh, about the other post on searching by user... As long as there isn't any search words (just a username) it should use the numeric indexes. It's been a while since I've peeled through the search code though, I'll try to look over it one of these days and see what can be done. I'm not sure if the code works if you put in a search term AND username.
If you check out the link I pasted someone attempted to get this working. Granted I am running 3.6.2 with a 3.6.8 search.php+/includes/functions_search.php, but I believe something weird is going on with it, but I can't figure out exactly what is going on.

There's a definite bug with usernames with a "=" in them regardless of if I'm broken for other reasons
Reply With Quote
  #429  
Old 11-05-2007, 04:12 PM
BrandiDup's Avatar
BrandiDup BrandiDup is offline
 
Join Date: Jun 2005
Location: San Diego, CA
Posts: 213
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone have a forum where I can see this type of search in action? I have tried reading through this thread and on the sphinx site but can't seem to grasp how exactly it's different than vbulletin search, aside from it being a better solution for big boards. We have 1.5 mil posts on our site and search doesn't seem to lag too much right now, but this may be something we should look into soon before any problems arise. How is the interface of the search different? Does it look similar to google's search?
Reply With Quote
  #430  
Old 11-05-2007, 11:35 PM
weeno weeno is offline
 
Join Date: Jan 2002
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BrandiDup View Post
Does anyone have a forum where I can see this type of search in action? I have tried reading through this thread and on the sphinx site but can't seem to grasp how exactly it's different than vbulletin search, aside from it being a better solution for big boards. We have 1.5 mil posts on our site and search doesn't seem to lag too much right now, but this may be something we should look into soon before any problems arise. How is the interface of the search different? Does it look similar to google's search?
http://forums.macrumors.com/search.php

Sphinx search with two different search options (match documentation)

Normal = Match All (SPH_MATCH_ALL mode)
Extended = Extended (SPH_MATCH_EXTENDED mode - not all options work)

both use sphinx.

arn
Reply With Quote
Reply

Thread Tools
Display Modes

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 04:46 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.10377 seconds
  • Memory Usage 2,280KB
  • 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
  • (4)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
  • (2)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
  • (1)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