Thread: Sphinx Search
View Single Post
  #226  
Old 11-12-2006, 02:42 PM
Neil Lock Neil Lock is offline
 
Join Date: Sep 2005
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey all, well i have been playing around with no real success with test.php which i can only assume means that my conf file is messed up somewhere, if anyone could take a few secs to see whether I have made any glaring errors

Code:
#
# sphinx configuration file sample
#

#############################################################################
## data source definition
#############################################################################

source src1
{
	type				= mysql
	strip_html			= 0
	sql_host			= ******
	sql_user			= vbupgradeforum
	sql_pass			= ******
	sql_db				= vb_upgrade_forums
	sql_port			= 3306


	sql_query_pre		= REPLACE INTO sph_counter SELECT 1, MAX(postid) FROM vb_post

	sql_query_range		= SELECT MIN(postid), MAX(postid) FROM vb_post
	sql_range_step		= 1000
	sql_query = \
		SELECT postid, forumid, vb_post.threadid as threadid, IF(vb_post.userid=0,99999999,vb_post.userid) AS userid, IF(postuserid=0,99999999,postuserid) AS postuserid, vb_post.title, pagetext, vb_post.dateline \
		FROM vb_post \
		INNER JOIN vb_thread AS thread ON(thread.threadid = vb_post.threadid) \
		WHERE vb_post.visible = 1 AND postid >= $start AND postid <= $end \
			AND postid <= ( SELECT max_doc_id FROM sph_counter WHERE counter_id = 1 );

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

	sql_query_post		=
}

source src2 : src1
{

	sql_query_pre		= 
	sql_query_range		= SELECT ( SELECT max_doc_id FROM sph_counter WHERE counter_id = 1 ), MAX(postid) FROM vb_post
	sql_range_step		= 1000
	sql_query = \
		SELECT postid, forumid, vb_post.threadid as threadid, IF(vb_post.userid=0,99999999,vb_post.userid) AS userid, IF(postuserid=0,99999999,postuserid) AS postuserid, vb_post.title, pagetext, vb_post.dateline \
		FROM vb_post \
		INNER JOIN vb_thread AS thread ON(thread.threadid = vb_post.threadid) \
		WHERE vb_post.visible = 1 AND postid >= $start AND postid <= $end \
			AND postid > ( SELECT max_doc_id FROM sph_counter WHERE counter_id = 1 );
}
	

source src3
{
	type				= mysql
	strip_html			= 0
	sql_host			= *****
	sql_user			= vbupgradeforum
	sql_pass			= *****
	sql_db				= vb_upgrade_forums
	sql_port			= 3306


	sql_query_pre		= REPLACE INTO sph_counter SELECT 2, MAX(threadid) FROM vb_thread

	sql_query_range		= SELECT MIN(threadid), MAX(threadid) FROM vb_thread
	sql_range_step		= 1000
	sql_query = \
		SELECT threadid, forumid, title, IF(postuserid=0,99999999,postuserid) AS postuserid, IF(firstpostid=0,99999999,firstpostid) as firstpostid, lastpost \
		FROM vb_thread \
		WHERE visible = 1 AND threadid >= $start AND threadid <= $end \
			AND threadid <= ( SELECT max_doc_id FROM sph_counter WHERE counter_id = 2 );

	sql_group_column	= forumid
	sql_group_column	= postuserid
	sql_group_column	= firstpostid
	sql_date_column		= lastpost

	sql_query_post		=
}

source src4 : src3
{
	sql_query_pre		= 
	sql_query_range		= SELECT ( SELECT max_doc_id FROM sph_counter WHERE counter_id = 2 ), MAX(threadid) FROM vb_thread
	sql_range_step		= 1000
	sql_query = \
		SELECT threadid, forumid, title, IF(postuserid=0,99999999,postuserid) AS postuserid, IF(firstpostid=0,99999999,firstpostid) as firstpostid, lastpost \
		FROM vb_thread \
		WHERE visible = 1 AND threadid >= $start AND threadid <= $end \
			AND threadid > ( SELECT max_doc_id FROM sph_counter WHERE counter_id = 2 );
}

#############################################################################
## index definition
#############################################################################

# local index example
#
# this is an index which is stored locally in the filesystem
# all indexing-time options (such as morphology and charsets) belong to the index
index vbpost
{
	source			= src1
	path			= /var/data/vbpost
	docinfo			= extern
	morphology		= none
	stopwords		=
	min_word_len		= 4
	charset_type		= sbcs
}

index vbpostindex
{
	source			= src2
	path			= /var/data/vbpostindex
        docinfo                 = extern
	morphology		= none
	stopwords		=
	min_word_len		= 4
	charset_type		= sbcs
}

index vbthreadindex
{
	source			= src3
	path			= /var/data/vbthreadindex
        docinfo                 = extern
	morphology		= none
	stopwords		=
	min_word_len		= 4
	charset_type		= sbcs
}

index vbthreadindexdelta
{
	source			= src4
	path			= /var/data/vbthreadindexdelta
        docinfo                 = extern
	morphology		= none
	stopwords		=
	min_word_len		= 4
	charset_type		= sbcs
}

index vbfulltext
{
        type                            = distributed
        local                           = vbpost
        local                           = vbpostindex
}

index vbfulltextthread
{
        type                            = distributed
        local                           = vbthreadindex
        local                           = vbthreadindexdelta
}

#############################################################################
## indexer settings
#############################################################################

indexer
{
	# memory limit
	# can be specified in bytes, kilobytes (mem_limit=1000K) or megabytes (mem_limit=10M)
	# will grow if set unacceptably low
	# will warn if set too low, hurting the performance
	# optional, default is 32M
	mem_limit			= 64M
}

#############################################################################
## searchd settings
#############################################################################

searchd
{
	# port on which search daemon will listen
	port				= 3312


	# log file
	# searchd run info is logged here
	log					= /var/log/searchd.log


	# query log file
	# all the search queries are logged here
	query_log			= /var/log/query.log


	# client read timeout, seconds
	read_timeout		= 5


	# maximum amount of children to fork
	# useful to control server load
	max_children		= 30


	# a file which will contain searchd process ID
	# used for different external automation scripts
	# MUST be present
	pid_file			= /var/log/searchd.pid


	# maximum amount of matches this daemon would retrieve from each index
	# and serve to client
	#
	# this parameter affects per-client memory usage slightly (16 bytes per match)
	# and CPU usage in match sorting phase; so blindly raising it to 1 million
	# is definitely NOT recommended
	#
	# default is 1000 (just like with Google)
	max_matches			= 1500
}

# --eof--


my tables use the extension vb_ and i went through and modified all the table names as per instructs. anything glaringly obvious>?

Neil
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01104 seconds
  • Memory Usage 1,799KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete