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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 03-14-2007, 01:06 PM
Mb81 Mb81 is offline
 
Join Date: Feb 2002
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still waiting for some help here. Thanks.

Quote:
Originally Posted by Mb81 View Post
Here it is. I don?t see any mistake.
It would be really nice if someone could confirm it. Thanks alot.

Code:
#
# sphinx configuration file sample
#

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

source src1
{
        type                            = mysql
        strip_html                      = 0
        sql_host                        = localhost
        sql_user                        = root
        sql_pass                        = xx
        sql_db                          = xx
        sql_port                        = 3306


        sql_query_pre           = REPLACE INTO sphinx.sphinx_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, post.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 sphinx.sphinx_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 sphinx.sphinx_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, post.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 sphinx.sphinx_counter WHERE counter_id = 1 );
}


source src3
{
        type                            = mysql
        strip_html                      = 0
        sql_host                        = localhost
        sql_user                        = root
        sql_pass                        = xx
        sql_db                          = xx
        sql_port                        = 3306


        sql_query_pre           = REPLACE INTO sphinx.sphinx_counter SELECT 2, MAX(threadid) FROM thread
        sql_query_range         = SELECT MIN(threadid), MAX(threadid) FROM 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 thread \
                WHERE visible = 1 AND threadid >= $start AND threadid <= $end \
                        AND threadid <= ( SELECT max_doc_id FROM sphinx.sphinx_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 sphinx.sphinx_counter WHERE counter_id = 2 ), MAX(threadid) FROM 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 thread \
                WHERE visible = 1 AND threadid >= $start AND threadid <= $end \
                        AND threadid > ( SELECT max_doc_id FROM sphinx.sphinx_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/sphinx/vbpost
        docinfo                 = extern
        morphology              = none
        stopwords               =
        min_word_len            = 4
        charset_type            = sbcs
}

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

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

index vbthreadindexdelta
{
        source                  = src4
        path                    = /var/sphinx/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/run/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
}
Reply With Quote
 


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:45 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.24249 seconds
  • Memory Usage 4,079KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_code
  • (1)bbcode_php
  • (18)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (41)post_thanks_box
  • (41)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (41)post_thanks_postbit_info
  • (41)postbit
  • (2)postbit_attachment
  • (41)postbit_onlinestatus
  • (41)postbit_wrapper
  • (1)showthread_list
  • (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_threadedmode.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_threaded
  • showthread_threaded_construct_link
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete