Jump to content
IPSViet.com

[SOLVED] Sphinx cho ipb 4


Kayako Saeki

Recommended Posts

  • Administrators

Nó là mã nguồn mở hỗ trợ tìm kiếm text nhanh hơn. Nếu có VPS hay server riêng thì cài nó còn hosting thì thường ko hỗ trợ

Hidden Content

    Give reaction or reply to this topic to see the hidden content.

Link to comment
Share on other sites

  • Administrators

IPS4 nó có sẵn file conf cho sphinx mà

searchd
{
	listen                  = :3312:mysql41
	max_children            = 30
	pid_file                = /buildsearchd.pid
	preopen_indexes         = 0
	collation_server        = utf8_general_ci
	compat_sphinxql_magics  = 0
	workers                 = threads
}

index ips
{
	type                    = rt
	path                    = /index
	charset_type            = utf-8
	
	rt_field                = index_title
	rt_field                = index_content
	rt_field                = index_tags
	rt_attr_bigint          = index_object_id
	rt_attr_bigint          = index_item_id
	rt_attr_bigint          = index_container_id
	rt_attr_bigint          = index_author
	rt_attr_bigint          = index_views
	rt_attr_bigint          = index_num_comments
	rt_attr_bigint          = index_num_reviews
	rt_attr_multi           = index_permissions
	rt_attr_timestamp       = index_date_created
	rt_attr_timestamp       = index_date_updated
	rt_attr_string          = index_class
	rt_attr_uint            = index_class_id
	rt_attr_uint            = index_hidden
}

 

Link to comment
Share on other sites

  • Administrators
#############################################################################
## data source definition
#############################################################################

source ipb_source_config
{
	#setup
	type					= mysql
	sql_host				= localhost
	sql_user				= root
	sql_pass				= mysql
	sql_db					= bimcw
	sql_port				= 3306
}


############################### --- TAGS --- ################################

source core_tags_search_main : ipb_source_config
{
	# Set our forum PID counter
	
	sql_query_pre	= REPLACE INTO cache_store VALUES( 'sphinx_core_tags_counter', (SELECT max(tag_id) FROM core_tags), 0, UNIX_TIMESTAMP(), 0 )
	
	# Query posts for the main source
	sql_query		= SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, REPLACE( t.tag_meta_area, '-', '_' ) as tag_meta_area,  \
							 CONCAT( ',', p.tag_perm_text, ',') as tag_perm_text ,p.tag_perm_visible \
					  FROM core_tags t \
					  LEFT JOIN core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup )
	
	# Fields	
	sql_attr_uint	   = search_id
	sql_attr_timestamp = tag_added
	sql_attr_uint      = tag_member_id
	sql_attr_uint      = tag_meta_id
	sql_attr_uint      = tag_meta_parent_id
	sql_attr_uint	   = tag_perm_visible
	sql_ranged_throttle	= 0
}

source core_tags_search_delta : core_tags_search_main
{
	# Override the base sql_query_pre
	
	sql_query_pre	= 
	
	# Query posts for the main source
	sql_query		= SELECT t.tag_id, t.tag_id as search_id, t.tag_added, t.tag_member_id, t.tag_meta_id, t.tag_meta_parent_id, t.tag_text, t.tag_meta_app, REPLACE( t.tag_meta_area, '-', '_' ) as tag_meta_area,  \
							 CONCAT( ',', p.tag_perm_text, ',') as tag_perm_text ,p.tag_perm_visible \
					  FROM core_tags t \
					  LEFT JOIN core_tags_perms p ON ( t.tag_aai_lookup=p.tag_perm_aai_lookup ) \
					  WHERE t.tag_id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_core_tags_counter' )
}

index core_tags_search_main
{
	source			= core_tags_search_main
	path			= /var/sphinx/core_tags_search_main
	
	docinfo			= extern
	mlock			= 0
	morphology		= none
	min_word_len	= 2
	charset_type	= sbcs
	html_strip		= 0
	infix_fields    = tag_text
	min_infix_len   = 3
	enable_star     = 1
}

index core_tags_search_delta : core_tags_search_main
{
   source			= core_tags_search_delta
   path				= /var/sphinx/core_tags_search_delta
}

################################# --- FORUM --- ##############################
source forums_search_posts_main : ipb_source_config
{
	# Set our forum PID counter
	
	sql_query_pre	= REPLACE INTO cache_store VALUES( 'sphinx_forums_counter_posts', (SELECT max(pid) FROM posts), 0, UNIX_TIMESTAMP(), 0 )
	
	# Query posts for the main source
	sql_query		= SELECT p.pid, p.pid as search_id, p.author_id, p.post_date, REPLACE( p.post, '-', '&\#8208') as post, p.topic_id, p.queued, \
							 t.tid, LOWER(t.title) as tordinal, REPLACE( t.title, '-', '&\#8208') as title, t.views, t.posts, t.forum_id, t.last_post, t.state, t.start_date, t.starter_id, t.last_poster_id, t.topic_firstpost, \
							CASE WHEN t.approved = -1 THEN 1 ELSE 0 END AS soft_deleted, \
							CASE WHEN t.approved = -1 THEN 0 ELSE t.approved END AS approved, \
							CASE WHEN t.topic_archive_status IN (0,3) THEN 0 ELSE 1 END AS archive_status, \
							CONCAT( SUBSTRING( t.last_post, 2, 8 ), '0', LPAD( t.tid, 10, 0 ) ) as last_post_group \
					  FROM posts p \
					  LEFT JOIN topics t ON ( p.topic_id=t.tid )
	
	# Fields	
	sql_attr_uint			= queued
	sql_attr_uint			= approved
	sql_attr_uint			= soft_deleted
	sql_attr_uint			= archive_status
	sql_attr_uint			= search_id
	sql_attr_uint			= forum_id
	sql_attr_timestamp	    = post_date
	sql_attr_timestamp	    = last_post
	sql_attr_timestamp	    = start_date
	sql_attr_uint			= author_id
	sql_attr_uint			= starter_id
	sql_attr_uint			= tid
	sql_attr_uint			= posts
	sql_attr_uint			= views
	sql_attr_str2ordinal	= tordinal
	sql_attr_bigint			= last_post_group
	sql_attr_multi			= uint tag_id from query; SELECT t.topic_firstpost, c.tag_id FROM core_tags c LEFT JOIN topics t ON (t.tid=c.tag_meta_id) WHERE c.tag_meta_app='forums' AND c.tag_meta_area='topics'
	
	sql_ranged_throttle	= 0
}

source forums_search_posts_delta : forums_search_posts_main
{
	# Override the base sql_query_pre
	
	sql_query_pre = 
	
	# Query posts for the delta source
	sql_query		= SELECT p.pid, p.pid as search_id, p.author_id, p.post_date, REPLACE( p.post, '-', '&\#8208') as post, p.topic_id, p.queued, \
							 t.tid, LOWER(t.title) as tordinal, REPLACE( t.title, '-', '&\#8208') as title, t.views, t.posts, t.forum_id, t.last_post, t.state, t.start_date, t.starter_id, t.last_poster_id, t.topic_firstpost, \
							 CASE WHEN t.approved = -1 THEN 1 ELSE 0 END AS soft_deleted, \
						 	 CASE WHEN t.approved = -1 THEN 0 ELSE t.approved END AS approved, \
						 	 CASE WHEN t.topic_archive_status IN (0,3) THEN 0 ELSE 1 END AS archive_status, \
							 CONCAT( SUBSTRING( t.last_post, 2, 8 ), '0', LPAD( t.tid, 10, 0 ) ) as last_post_group \
					  FROM posts p \
					  LEFT JOIN topics t ON ( p.topic_id=t.tid ) \
					  WHERE p.pid > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_forums_counter_posts' )
					  
	sql_query_killlist = SELECT pid FROM posts WHERE pid > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_forums_counter_posts' )
}

index forums_search_posts_main
{
	source			= forums_search_posts_main
	path			= /var/sphinx/forums_search_posts_main
	
	docinfo			= extern
	mlock			= 0
	morphology		= none
	min_word_len	= 2
	charset_type	= sbcs
	html_strip		= 0
	infix_fields    = post, title
	min_infix_len   = 3
	enable_star     = 1
}

index forums_search_posts_delta : forums_search_posts_main
{
   source			= forums_search_posts_delta
   path				= /var/sphinx/forums_search_posts_delta
}

source forums_search_archive_main : ipb_source_config
{
	# Set our forum PID counter
	
	sql_query_pre	= REPLACE INTO cache_store VALUES( 'sphinx_forums_counter_archives', (SELECT max(archive_id) FROM forums_archive_posts), 0, UNIX_TIMESTAMP(), 0 )
	
	# Query posts for the main source
	sql_query		= SELECT p.archive_id, p.archive_id as search_id, p.archive_author_id as author_id, p.archive_content_date as post_date, REPLACE( p.archive_content, '-', '&\#8208') as archive_content, p.archive_topic_id, p.archive_queued as queued, \
							 t.tid, LOWER(t.title) as tordinal, REPLACE( t.title, '-', '&\#8208') as title, t.views, t.posts, t.forum_id, t.last_post, t.state, t.start_date, t.starter_id, t.last_poster_id, t.topic_firstpost, \
							CASE WHEN t.approved = -1 THEN 1 ELSE 0 END AS soft_deleted, \
							CASE WHEN t.approved = -1 THEN 0 ELSE t.approved END AS approved, \
							CASE WHEN t.topic_archive_status IN (0,3) THEN 0 ELSE 1 END AS archive_status, \
							CONCAT( SUBSTRING( t.last_post, 2, 8 ), '0', LPAD( t.tid, 10, 0 ) ) as last_post_group \
					  FROM forums_archive_posts p \
					  LEFT JOIN topics t ON ( p.archive_topic_id=t.tid )
	
	# Fields	
	sql_attr_uint			= queued
	sql_attr_uint			= approved
	sql_attr_uint			= soft_deleted
	sql_attr_uint			= archive_status
	sql_attr_uint			= search_id
	sql_attr_uint			= forum_id
	sql_attr_timestamp	    = post_date
	sql_attr_timestamp	    = last_post
	sql_attr_timestamp	    = start_date
	sql_attr_uint			= author_id
	sql_attr_uint			= starter_id
	sql_attr_uint			= tid
	sql_attr_uint			= posts
	sql_attr_uint			= views
	sql_attr_str2ordinal	= tordinal
	sql_attr_bigint			= last_post_group
	sql_attr_multi			= uint tag_id from query; SELECT t.topic_firstpost, c.tag_id FROM core_tags c LEFT JOIN topics t ON (t.tid=c.tag_meta_id) WHERE c.tag_meta_app='forums' AND c.tag_meta_area='topics'
	
	sql_ranged_throttle	= 0
}

source forums_search_archive_delta : forums_search_archive_main
{
	# Override the base sql_query_pre
	
	sql_query_pre = 
	
	# Query posts for the delta source
	sql_query		= SELECT p.archive_id, p.archive_id as search_id, p.archive_author_id as author_id, p.archive_content_date as post_date, REPLACE( p.archive_content, '-', '&\#8208') as archive_content, p.archive_topic_id, p.archive_queued as queued, \
							 t.tid, LOWER(t.title) as tordinal, REPLACE( t.title, '-', '&\#8208') as title, t.views, t.posts, t.forum_id, t.last_post, t.state, t.start_date, t.starter_id, t.last_poster_id, t.topic_firstpost, \
							 CASE WHEN t.approved = -1 THEN 1 ELSE 0 END AS soft_deleted, \
						 	 CASE WHEN t.approved = -1 THEN 0 ELSE t.approved END AS approved, \
							 CASE WHEN t.topic_archive_status IN (0,3) THEN 0 ELSE 1 END AS archive_status, \
							 CONCAT( SUBSTRING( t.last_post, 2, 8 ), '0', LPAD( t.tid, 10, 0 ) ) as last_post_group \
					  FROM forums_archive_posts p \
					  LEFT JOIN topics t ON ( p.archive_topic_id=t.tid ) \
					  WHERE p.archive_id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_forums_counter_archives' )
	
	sql_query_killlist = SELECT archive_id FROM forums_archive_posts WHERE archive_id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_forums_counter_archives' )
}

index forums_search_archive_main
{
	source			= forums_search_archive_main
	path			= /var/sphinx/forums_search_archive_main
	
	docinfo			= extern
	mlock			= 0
	morphology		= none
	min_word_len	= 2
	charset_type	= sbcs
	html_strip		= 0
	infix_fields    = archive_content, title
	min_infix_len   = 3
	enable_star     = 1
}

index forums_search_archive_delta : forums_search_archive_main
{
   source			= forums_search_archive_delta
   path				= /var/sphinx/forums_search_archive_delta
}

############################ --- DOWNLOADS --- ##############################

source downloads_search_main : ipb_source_config
{
	# Set our forum PID counter
	sql_query_pre	= REPLACE INTO cache_store VALUES( 'sphinx_downloads_counter', (SELECT max(file_id) FROM downloads_files), 0, UNIX_TIMESTAMP(), 0 )
	
	# Query posts for the main source
	sql_query		= SELECT f.file_id as dont_use_this, f.file_id as search_id, f.file_name as fordinal, REPLACE( f.file_name, '-', '&\#8208') as file_name, REPLACE( f.file_desc, '-', '&\#8208') as file_desc, cc.field_2, cc.field_1, cc.field_3, f.* \
					  FROM downloads_files f \
					  LEFT JOIN downloads_ccontent cc ON (cc.file_id=f.file_id)
	
	# Fields	
	sql_attr_uint			= search_id
	sql_attr_uint			= file_id
	sql_attr_uint			= file_cat
	sql_attr_uint			= file_open
	sql_attr_uint			= file_views
	sql_attr_uint			= file_rating
	sql_attr_uint			= file_downloads
	sql_attr_timestamp		= file_updated
	sql_attr_timestamp		= file_submitted
	sql_attr_uint			= file_submitter
	sql_attr_str2ordinal	= fordinal
	sql_attr_float			= file_cost
	sql_attr_multi			= uint tag_id from query; SELECT tag_meta_id, tag_id FROM core_tags WHERE tag_meta_app='downloads' AND tag_meta_area='files'
	
	sql_ranged_throttle	= 0
}

source downloads_search_delta : downloads_search_main
{
	# Override the base sql_query_pre
	sql_query_pre	= 
	
	# Query posts for the main source
	sql_query		= SELECT f.file_id as dont_use_this, f.file_id as search_id, f.file_name as fordinal, REPLACE( f.file_name, '-', '&\#8208') as file_name, REPLACE( f.file_desc, '-', '&\#8208') as file_desc, f.*, cc.field_2, cc.field_1, cc.field_3 \
					  FROM downloads_files f \
					  LEFT JOIN downloads_ccontent cc ON (cc.file_id=f.file_id) \
					  WHERE f.file_id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_downloads_counter' )
}

index downloads_search_main
{
	source			= downloads_search_main
	path			= /var/sphinx/downloads_search_main
	
	docinfo			= extern
	mlock			= 0
	morphology		= none
	min_word_len	= 2
	charset_type	= sbcs
	html_strip		= 0	
}

index downloads_search_delta : downloads_search_main
{
   source			= downloads_search_delta
   path				= /var/sphinx/downloads_search_delta
}

source downloads_comments_main : ipb_source_config
{
	# Set our forum PID counter
	sql_query_pre	= REPLACE INTO cache_store VALUES( 'sphinx_downloads_comments_counter', (SELECT max(comment_id) FROM downloads_comments), 0, UNIX_TIMESTAMP(), 0 )
	
	# Query posts for the main source
	sql_query		= SELECT c.comment_id, c.comment_id as search_id, c.comment_mid as comment_member_id, c.comment_date, c.comment_open, c.comment_text, \
	 						 f.file_name as fordinal, REPLACE( f.file_name, '-', '&\#8208') as file_name, REPLACE( f.file_desc, '-', '&\#8208') as file_desc, f.*, cc.field_2, cc.field_1, cc.field_3 \
					  FROM downloads_comments c \
					  LEFT JOIN downloads_files f ON ( c.comment_fid=f.file_id ) \
					  LEFT JOIN downloads_ccontent cc ON (cc.file_id=f.file_id) 
	
	# Fields
	sql_attr_uint			= search_id
	sql_attr_uint			= file_id
	sql_attr_uint			= file_cat
	sql_attr_uint			= file_open
	sql_attr_uint			= file_views
	sql_attr_uint			= file_rating
	sql_attr_uint			= file_downloads
	sql_attr_uint			= comment_open
	sql_attr_uint			= comment_member_id
	sql_attr_timestamp		= comment_date
	sql_attr_timestamp		= file_updated
	sql_attr_timestamp		= file_submitted
	sql_attr_uint			= file_submitter
	sql_attr_str2ordinal	= fordinal
	sql_attr_float			= file_cost
	sql_ranged_throttle	= 0
}

source downloads_comments_delta : downloads_comments_main
{
	# Override the base sql_query_pre
	sql_query_pre = 
	
	# Query posts for the delta source
	sql_query		= SELECT c.comment_id, c.comment_id as search_id, c.comment_mid as comment_member_id, c.comment_date, c.comment_open, c.comment_text, \
	 						 f.file_name as fordinal, REPLACE( f.file_name, '-', '&\#8208') as file_name, REPLACE( f.file_desc, '-', '&\#8208') as file_desc, f.*, cc.field_2, cc.field_1, cc.field_3 \
					  FROM downloads_comments c \
					  LEFT JOIN downloads_files f ON ( c.comment_fid=f.file_id ) \
					  LEFT JOIN downloads_ccontent cc ON (cc.file_id=f.file_id) \
					  WHERE c.comment_id <= ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_downloads_comments_counter' )	
}

index downloads_comments_main
{
	source			= downloads_comments_main
	path			= /var/sphinx/downloads_comments_main
	
	docinfo			= extern
	mlock			= 0
	morphology		= none
	min_word_len	= 2
	charset_type	= sbcs
	html_strip		= 0
	infix_fields    = comment_text
	min_infix_len   = 3
	enable_star     = 1
}

index downloads_comments_delta : downloads_comments_main
{
   source			= downloads_comments_delta
   path				= /var/sphinx/downloads_comments_delta
}

################################# --- BLOG --- ##############################

source blog_search_main : ipb_source_config
{
	# Set our forum PID counter
	sql_query_pre	= REPLACE INTO cache_store VALUES( 'sphinx_blog_counter', (SELECT max(entry_id) FROM blog_entries), 0, UNIX_TIMESTAMP(), 0 )
	
	# Query posts for the main source
	sql_query		= SELECT e.entry_id, e.entry_id as search_id, e.entry_name, e.entry_name as tordinal, e.entry, e.entry_date, e.entry_author_id, e.entry_num_comments, e.blog_id, \
							 b.blog_owner_only, b.blog_private, b.blog_disabled, \
					  		CASE WHEN e.entry_status='published' THEN 0 ELSE e.entry_author_id END AS entry_not_published, \
							CASE WHEN b.blog_owner_only=0 THEN 0 ELSE b.member_id END AS blog_owner_id, \
							CASE WHEN b.blog_authorized_users IS NULL THEN 0 ELSE 1 END AS authorized_users \
						FROM blog_entries e \
					  LEFT JOIN blog_blogs b ON ( b.blog_id=e.blog_id )
	
	# Fields	
	sql_attr_uint			= search_id
	sql_attr_uint			= blog_owner_only
	sql_attr_timestamp		= entry_date
	sql_attr_str2ordinal	= tordinal
	sql_attr_str2ordinal    = entry_name
	sql_attr_uint			= entry_author_id
	sql_attr_uint			= entry_num_comments
	sql_attr_uint		    = blog_id
	sql_attr_uint			= blog_private
	sql_attr_uint			= blog_disabled
	sql_attr_uint			= entry_not_published
	sql_attr_uint			= blog_owner_id
	sql_attr_uint			= authorized_users
	sql_attr_multi			= uint tag_id from query; SELECT tag_meta_id, tag_id FROM core_tags WHERE tag_meta_app='blog' AND tag_meta_area='entries'
	sql_ranged_throttle	= 0
}

source blog_search_delta : blog_search_main
{
	# Override the base sql_query_pre
	sql_query_pre = 
	
	# Query posts for the delta source
	sql_query		= SELECT e.entry_id, e.entry_id as search_id, e.entry_name, e.entry_name as tordinal, e.entry, e.entry_date, e.entry_author_id, e.entry_num_comments, e.blog_id, b.blog_owner_only, b.blog_private, b.blog_disabled, \
					  		CASE WHEN e.entry_status='published' THEN 0 ELSE e.entry_author_id END AS entry_not_published, \
							CASE WHEN b.blog_owner_only=0 THEN 0 ELSE b.member_id END as blog_owner_id, \
							CASE WHEN b.blog_authorized_users IS NULL THEN 0 ELSE 1 END AS authorized_users \
						FROM blog_entries e \
					  LEFT JOIN blog_blogs b ON ( b.blog_id=e.blog_id ) \
					  WHERE e.entry_id > ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_blog_counter' )	
}

index blog_search_main
{
	source			= blog_search_main
	path			= /var/sphinx/blog_search_main
	
	docinfo			= extern
	mlock			= 0
	morphology		= none
	min_word_len	= 2
	charset_type	= sbcs
	html_strip		= 0
	infix_fields    = entry_name, entry
	min_infix_len   = 3
	enable_star     = 1
}

index blog_search_delta : blog_search_main
{
   source			= blog_search_delta
   path				= /var/sphinx/blog_search_delta
}

source blog_comments_main : ipb_source_config
{
	# Set our forum PID counter
	sql_query_pre	= REPLACE INTO cache_store VALUES( 'sphinx_blog_comments_counter', (SELECT max(comment_id) FROM blog_comments), 0, UNIX_TIMESTAMP(), 0 )
	
	# Query posts for the main source
	sql_query		= SELECT c.comment_id, c.comment_id as search_id, c.member_id as comment_member_id, c.comment_date, c.comment_approved, c.comment_text, \
	 						 e.entry_id, e.entry_name as tordinal, e.entry_date, e.entry_author_id, e.entry_num_comments, e.blog_id, \
							 b.blog_owner_only, b.blog_private, b.blog_disabled, \
					  		CASE WHEN e.entry_status='published' THEN 0 ELSE e.entry_author_id END AS entry_not_published, \
							CASE WHEN b.blog_owner_only=0 THEN 0 ELSE b.member_id END AS blog_owner_id, \
							CASE WHEN b.blog_authorized_users IS NULL THEN 0 ELSE 1 END AS authorized_users, \
							CONCAT(e.entry_last_comment_date, '.', e.entry_id ) as last_post_group \
						FROM blog_comments c \
					  LEFT JOIN blog_entries e ON ( c.entry_id=e.entry_id ) \
					  LEFT JOIN blog_blogs b ON ( b.blog_id=e.blog_id )
	
	# Fields	
	sql_attr_uint			= search_id
	sql_attr_uint			= entry_id
	sql_attr_uint			= blog_owner_only
	sql_attr_timestamp		= entry_date
	sql_attr_str2ordinal	= tordinal
	sql_attr_uint			= entry_author_id
	sql_attr_uint			= entry_num_comments
	sql_attr_uint		    = blog_id
	sql_attr_uint			= blog_private
	sql_attr_uint			= blog_disabled
	sql_attr_uint			= entry_not_published
	sql_attr_uint			= blog_owner_id
	sql_attr_uint			= authorized_users
	sql_attr_uint			= last_post_group
	sql_attr_timestamp		= comment_date
	sql_attr_uint			= comment_member_id
	sql_attr_uint			= comment_approved
	sql_ranged_throttle	= 0
}

source blog_comments_delta : blog_comments_main
{
	# Override the base sql_query_pre
	sql_query_pre = 
	
	# Query posts for the delta source
	sql_query		= SELECT c.comment_id, c.comment_id as search_id, c.member_id as comment_member_id, c.comment_date, c.comment_approved, c.comment_text, \
	 						 e.entry_id, e.entry_name as tordinal, e.entry_date, e.entry_author_id, e.entry_num_comments, e.blog_id, \
							 b.blog_owner_only, b.blog_private, b.blog_disabled, \
					  		CASE WHEN e.entry_status='published' THEN 0 ELSE e.entry_author_id END AS entry_not_published, \
							CASE WHEN b.blog_owner_only=0 THEN 0 ELSE b.member_id END AS blog_owner_id, \
							CASE WHEN b.blog_authorized_users IS NULL THEN 0 ELSE 1 END AS authorized_users, \
							CONCAT(e.entry_last_comment_date, '.', e.entry_id ) as last_post_group \
						FROM blog_comments c \
					  LEFT JOIN blog_entries e ON ( c.entry_id=e.entry_id ) \
					  LEFT JOIN blog_blogs b ON ( b.blog_id=e.blog_id ) \
					  WHERE c.comment_id <= ( SELECT cs_value FROM cache_store WHERE cs_key='sphinx_blog_comments_counter' )	
}

index blog_comments_main
{
	source			= blog_comments_main
	path			= /var/sphinx/blog_comments_main
	
	docinfo			= extern
	mlock			= 0
	morphology		= none
	min_word_len	= 2
	charset_type	= sbcs
	html_strip		= 0
	infix_fields    = comment_text
	min_infix_len   = 3
	enable_star     = 1
}

index blog_comments_delta : blog_comments_main
{
   source			= blog_comments_delta
   path				= /var/sphinx/blog_comments_delta
}



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

indexer
{
	mem_limit			= 256M
}

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

searchd
{
	listen				= 127.0.0.1
	port				= 3312
	log					= /var/sphinx/log/searchd.log
	query_log			= /var/sphinx/log/query.log
	read_timeout		= 5
	max_children		= 30
	pid_file			= /var/sphinx/log/searchd.pid
	max_matches			= 1000
	seamless_rotate		= 0
	preopen_indexes		= 0
	unlink_old			= 1
}

# --eof--

File đó có thể vào ACP -> Manage Applications & Modules để down nó

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...