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

Reply
 
Thread Tools Display Modes
  #331  
Old 05-01-2007, 09:42 AM
bmanzzz bmanzzz is offline
 
Join Date: Sep 2005
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can some one please provide a step by step how to install Sphinx Search and configuring
and then how to use it with Vbulletin
Reply With Quote
  #332  
Old 05-01-2007, 10:03 AM
ALanJay ALanJay is offline
 
Join Date: Jun 2002
Location: London
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Well I now have a system that appears to work but for the vBulletin database always gives no results but for my own database gives the expected results.

Between 0.9.6 and 0.9.7 have there been many changes to the sphinx.conf it is the only thing that I can think might be causing the issue unless anyone has any other ideas?
Reply With Quote
  #333  
Old 05-01-2007, 10:08 AM
amcd amcd is offline
 
Join Date: Oct 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bmanzzz View Post
can some one please provide a step by step how to install Sphinx Search and configuring
and then how to use it with Vbulletin
https://vborg.vbsupport.ru/showpost.php?p=1104866

This link is given right at the top of the first post of this thread. This is the most comprehensive guide so far. If this is not enough, then you have to read through the whole thread.

ALanJay, I am running sphinx without problems on FreeBSD amd64. If you have any specific questions about versions etc, maybe I can help.
Reply With Quote
  #334  
Old 05-01-2007, 10:34 AM
ALanJay ALanJay is offline
 
Join Date: Jun 2002
Location: London
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amcd View Post
ALanJay, I am running sphinx without problems on FreeBSD amd64. If you have any specific questions about versions etc, maybe I can help.
Thanks amcd,

Well most of my FreeBSD issues have been solved - compilation and running all see fine.

I have changed sphinxapi.php to include the sugested:

function unpack31($f,$s)
{
$arr=unpack($f,$s);
foreach($arr as $k=>$v) {
$b = sprintf("%b", $v);
if(strlen($b) == 64){
$arr[$k]=bindec(substr($b, 33));
}
}
return $arr;
}


I have made the changes to sphix.conf for I think for the changes to the column settings ie

sql_group_column = forumid
sql_group_column = threadid
sql_group_column = userid
sql_group_column = postuserid
sql_date_column = dateline
sql_query_post =

I think the SQL stuff is unchanged from 0.9.6 to 0.9.7 and still have for the Post Index:

Code:
        sql_query_pre           = REPLACE INTO spy_forum.sph_counter SELECT 1, MAX(postid) FROM post
        sql_query_range         = SELECT MIN(postid), MAX(postid) FROM post
        sql_range_step          = 1000
        sql_query = \
                SELECT postid, forumid, post.threadid as threadid, IF(post.userid=0,99999999,post.userid) AS userid, IF(postuserid=0,99999999,postuserid) AS postuserid, p
ost.title, pagetext, post.dateline \
                FROM post \
                INNER JOIN thread AS thread ON(thread.threadid = post.threadid) \
                WHERE post.visible = 1 AND postid >= $start AND postid <= $end \
                        AND postid <= ( SELECT max_doc_id FROM spy_forum.sph_counter WHERE counter_id = 1 );
and the delta

Code:
        sql_query_pre           =
        sql_query_range         = SELECT ( SELECT max_doc_id FROM spy_forum.sph_counter WHERE counter_id = 1 ), MAX(postid) FROM post
        sql_range_step          = 1000
        sql_query = \
                SELECT postid, forumid, post.threadid as threadid, IF(post.userid=0,99999999,post.userid) AS userid, IF(postuserid=0,99999999,postuserid) AS postuserid, p
ost.title, pagetext, post.dateline \
                FROM post \
                INNER JOIN thread AS thread ON(thread.threadid = post.threadid) \
                WHERE post.visible = 1 AND postid >= $start AND postid <= $end \
                        AND postid > ( SELECT max_doc_id FROM spy_forum.sph_counter WHERE counter_id = 1 );
index DSFullTextPostIndex
{
type = distributed
local = DSPostIndex
local = DSPostIndexDELTA
}


it all seems to work ok when I create the indexes from scratch but the test.php and vB search.php always give 0 results.

ie

php ./xx-test-search.php -i DSFullTextPostIndex "digital tv"
Query 'digital tv ' retrieved 0 of 0 matches in 0.000 sec.
Query stats:
'digital' found 0 times in 0 documents
'tv' found 0 times in 0 documents

yet when I use my internal database it all works fine:

php ./xx-test-search.php -i DSramsIndex "digital tv"
Query 'digital tv ' retrieved 1000 of 1729 matches in 0.005 sec.
Query stats:
'digital' found 20655 times in 4243 documents
'tv' found 24047 times in 5666 documents
Matches:
1. doc_id=4744, weight=208, date=2002-01-20 22:44:53
2. doc_id=4868, weight=208, date=2002-01-31 20:01:25

This would imply some sort of error with the creating of the vBulletin index in differences between the 3.0 stream I was previously using and the 3.6 stream of the new test site?

Any thoughts?
Reply With Quote
  #335  
Old 05-01-2007, 11:05 AM
amcd amcd is offline
 
Join Date: Oct 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am using sphinx 0.9.7 rc1. I have not made the edit for unpack31.

Why do you write spy_forum.sph_counter all the time? Is the counter in a different DB? I have the counter in the same DB.

One thing I noticed is that the command line search does not return any results from compound indexes.

search -c /usr/local/etc/sphinx.conf --index 'postmain' something
and
search -c /usr/local/etc/sphinx.conf --index 'postdelta' something
both work.

but
search -c /usr/local/etc/sphinx.conf --index 'post' something
returns zero results.

Maybe you are facing the same issue with the test script.

For what it is worth, I can send you my files if you want.
Reply With Quote
  #336  
Old 05-01-2007, 01:44 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by amcd View Post
One thing I noticed is that the command line search does not return any results from compound indexes.
Confirmed...I don't know if that is a bug or a feature.
Reply With Quote
  #337  
Old 05-01-2007, 03:13 PM
ALanJay ALanJay is offline
 
Join Date: Jun 2002
Location: London
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well that explains something - having done some more testing I can get results from the test programme now from ThreadIndex but not PostIndex which is very peculiar.

And this follows through on the actual vb search.php in that if you "search titmes only" it seems to work but "search entire posts"

One of my colleages was kind enough to compare the actual mySQL and the results from the different 3.0 and 3.6 databases and we discovered that there was a difference. It appears that after the upgrade (to 3.6) the index doesn't seem to be being correctly read so an explicit inclusion of - USE INDEX (threadid) - we thoguht might work:
Code:
                SELECT postid, forumid, post.threadid as threadid, IF(post.userid=0,99999999,post.userid) AS userid, IF(postuserid=0,99999999,postuserid) AS postuserid, post.
title, pagetext, post.dateline \
                FROM post \
                USE INDEX (threadid) \
                INNER JOIN thread AS thread ON(thread.threadid = post.threadid) \
                WHERE post.visible = 1 AND postid >= $start AND postid <= $end \
                        AND postid > ( SELECT max_doc_id FROM spy_forum.sph_counter WHERE counter_id = 1 );
Except that doesn't work when creating the sphinx index but does when using mysql directly.

Reply With Quote
  #338  
Old 05-08-2007, 08:16 PM
Rayn21 Rayn21 is offline
 
Join Date: Sep 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kmike View Post
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.
Are further modifications to orban's code required to get this working?

It seems that my modified search.php is still using the VB search engine for some queries. (those without keywords)
Reply With Quote
  #339  
Old 05-08-2007, 08:20 PM
orban orban is offline
 
Join Date: Jan 2005
Posts: 445
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes mine doesn't support that.
Reply With Quote
  #340  
Old 05-10-2007, 07:43 PM
rix rix is offline
 
Join Date: Dec 2003
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks orban for the script, I'm loving it!.

I used the search.php and applied orban's patch but I only get the result when I choose the option xx month ago or something but not "Any Date". The debug returns the following for "Any Date"

Code:
Query '' retrieved 0 of 0 matches in 0.027 sec.
Query stats:
'kereta' found 5277 times in 3731 documents
While the same keyword from "Yesterday" returns
Code:
Query '' retrieved 4 of 4 matches in 0.005 sec.
Query stats:
'kereta' found 5277 times in 3731 documents
I'm guessing something wrong with the php but not sure which script.
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 11:59 PM.


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.13549 seconds
  • Memory Usage 2,296KB
  • Queries Executed 14 (?)
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
  • (5)bbcode_code
  • (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
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete