[Practice] The sphinx configuration file,

Source: Internet
Author: User

[Practice] The sphinx configuration file,

# Source src1 {type = mysql SQL _host = localhost SQL _user = root SQL _pass = password SQL _db = test SQL _sock =/usr/local/mysql. sock SQL _query_pre = set names utf8 SQL _query_pre = replace into sph_counter SELECT 1, MAX (id) FROM statements SQL _query = \ SELECT id, group_id, UNIX_TIMESTAMP (date_added) AS date_added, title, content \ FROM documents where id <= (SELECT max_doc_id FROM sph_counter WHERE counter_id = 1) SQL _attr_uint = group_id encoding = date_added encoding = 0 }###### source # tblpnrsource src2 {type = mysql SQL _host = localhost SQL _user = root SQL _pass = password SQL _db = jinripnr SQL _sock =/ usr/local/mysql. sock SQL _query_pre = SET NAMES utf8sql_query_pre = REPLACE INTO jinri. sph_counter SELECT 2, MAX (id), max (update_time) FROM tblpnr SQL _query = \ SELECT id, orderno, pnr, ordertime FROM tblpnr where \ update_time <= (SELECT last_time FROM jinri. sph_counter WHERE counter_id = 2) # used for string attribute setting, filtering, and sorting # SQL _attr_uint = SQL _attr_timestamp = Signature = orderno # retrieve only ordernosql_field_string = pnr # SQL _field_string for full-text storage Index, SQL _attr_string is only used for retrieval and does not store indexes # partition query settings # SQL _query_range = SELECT MIN (id), MAX (id) FROM tblpnr # SQL _range_step = 500000 # SQL _query = SELECT * FROM tblpnr WHERE id> = $ start AND id <= $ end SQL _ranged_throttle = 0 # No time interval, unit: seconds} # tblticketnosource src3 {type = mysql SQL _host = localhost SQL _user = root SQL _pass = password SQL _db = jinritickno SQL _sock =/usr/local/mysql. sock SQL _query_pre = SET NAMES utf8sql_query_pre = REPLACE INTO jinri. sph_counter SELECT 3, MAX (id), \ max (update_time) FROM tblticketno SQL _query = \ SELECT id, orderno, ticketno, ordertime \ FROM tblticketno where update_time <= (SELECT last_time FROM jinri. sph_counter \ WHERE counter_id = 3) # used for string attribute setting, filtering, and sorting # SQL _attr_uint = SQL _attr_timestamp = ordertimesql_attr_string = orderno # retrieve only ordernosql_field_string = ticketno # SQL _field_string for full-text storage index, SQL _attr_string is only used for retrieval and does not store indexes # partition query settings # SQL _query_range = SELECT MIN (id), MAX (id) FROM tblticketno # SQL _range_step = 1000000 # SQL _query = SELECT * FROM tblticketno WHERE id> = $ start AND id <= $ end certificate = 0} # tblpassengernamesource src4 {type = mysql SQL _host = localhost SQL _user = root SQL _pass = password SQL _db = jinripname SQL _sock =/usr/local/mysql. sock SQL _query_pre = SET NAMES utf8sql_query_pre = REPLACE INTO jinri. sph_counter SELECT 4, MAX (id), \ max (update_time) FROM tblpassengername SQL _query = \ SELECT id, orderno, passengername, ordertime \ FROM tblpassengername where update_time <= (SELECT last_time FROM jinri. sph_counter \ WHERE counter_id = 4) # used for string attribute setting, filtering, and sorting # SQL _attr_uint = SQL _attr_timestamp = ordertimesql_attr_string = orderno # retrieve only ordernosql_field_string = passengername # SQL _field_string for full-text storage index, SQL _attr_string is only used for retrieval and does not store index records = 0} # tblordernosource src5 {type = mysql SQL _host = localhost SQL _user = root SQL _pass = password SQL _db = jinriorderno SQL _sock =/usr/local/mysql/ mysql. sock SQL _query_pre = set names utf8 SQL _query_pre = REPLACE INTO jinri. sph_counter SELECT 5, MAX (id), \ max (update_time) FROM tblorderno SQL _query = \ SELECT id, orderno, ordertime \ FROM tblorderno where update_time <= (SELECT last_time FROM jinri. sph_counter \ WHERE counter_id = 5) # used for string attribute setting, filtering, and sorting # SQL _attr_uint = SQL _attr_timestamp = ordertime SQL _field_string = orderno # SQL _field_string is used to save the full text index, SQL _attr_string is only used for retrieval and does not store index records = 0} # tblpnrsource src2throttled: src2 {records = 100} # response src3throttled: src3 {records = 100} # tblpassengernamesource src4throttled: src4 {SQL _ranged_throttle = 100} # tblordernosource src5throttled: src5 {SQL _ranged_throttle = 100 }###### incremental source # tblpnrsource src2_delta: src2 {SQL _query_pre = set names utf8sql_query_pre = SQL _query = \ SELECT id, orderno, pnr, ordertime \ FROM tblpnr where update_time> (SELECT last_time \ FROM jinri. sph_counter WHERE counter_id = 2)} # tblticketnosource src3_delta: src3 {SQL _query_pre = set names utf8sql_query_pre = SQL _query = \ SELECT id, orderno, ticketno, ordertime \ FROM tblticketno where update_time> (SELECT last_time \ FROM jinri. sph_counter WHERE counter_id = 3)} # tblpassengernamesource src4_delta: src4 {SQL _query_pre = set names utf8sql_query_pre = SQL _query = \ SELECT id, orderno, passengername, ordertime \ FROM tblpassengername where update_time> (SELECT last_time \ FROM jinri. sph_counter WHERE counter_id = 4)} # tblordernosource src5_delta: src5 {SQL _query_pre = set names utf8 SQL _query_pre = SQL _query = \ SELECT id, orderno, ordertime \ FROM tblorderno where update_time> (SELECT last_time \ FROM jinri. sph_counter WHERE counter_id = 5 )} ###### index # tblpnrindex src2 {source = src2 path =/usr/local/sphinx/var/data/src2 docinfo = extern dict = keywords mlock = 0 morphology = none min_word_len = 1 html_strip = 0 min_prefix_len = 0 # minimum prefix min_infix_len = 0 # minimum infix ngram_len = 1 # length cutting for non-letter data, the supported Chinese characters must be set to 1 ngram_chars = U + 4E00 .. U + 9FBF, U + 3400 .. U + 4DBF, U + 20000 .. U + 2A6DF, U + f900 .. U + FAFF, U + 2F800 .. U + 2FA1F, U + 2E80 .. U + 2EFF, U + 2F00 .. U + 2FDF, U + 3100 .. U + 312F, U + 31A0 .. U + 31BF, U + 3040 .. U + 309F, U + 30A0 .. U + 30FF, U + 31F0 .. U + 31FF, U + ac00 .. U + D7AF, U + 1100 .. U + 11FF, U + 3130 .. U + 318F, U + a000 .. U + A48F, U + a490 .. U + A4CF} # tblticketnoindex src3 {source = src3 path =/usr/local/sphinx/var/data/src3 docinfo = extern dict = keywords mlock = 0 morphology = none min_word_len = 1 html_strip = 0 min_prefix_len = 0 # minimum prefix min_infix_len = 0 # minimum infix ngram_len = 1 # Cut the length of non-letter data, the supported Chinese characters must be set to 1 ngram_chars = U + 4E00 .. U + 9FBF, U + 3400 .. U + 4DBF, U + 20000 .. U + 2A6DF, U + f900 .. U + FAFF, U + 2F800 .. U + 2FA1F, U + 2E80 .. U + 2EFF, U + 2F00 .. U + 2FDF, U + 3100 .. U + 312F, U + 31A0 .. U + 31BF, U + 3040 .. U + 309F, U + 30A0 .. U + 30FF, U + 31F0 .. U + 31FF, U + ac00 .. U + D7AF, U + 1100 .. U + 11FF, U + 3130 .. U + 318F, U + a000 .. U + A48F, U + a490 .. U + A4CF} # tblpassengernameindex src4 {source = src4 path =/usr/local/sphinx/var/data/src4 docinfo = extern dict = keywords mlock = 0 morphology = none min_word_len = 1 html_strip = 0 min_prefix_len = 0 # minimum prefix min_infix_len = 0 # minimum infix ngram_len = 1 # Cut the length of non-letter data, the supported Chinese characters must be set to 1 ngram_chars = U + 3000 .. U + 2FA1F, U + 4E00 .. U + 9FBF, U + 3400 .. U + 4DBF, U + 20000 .. U + 2A6DF, U + f900 .. U + FAFF, U + 2F800 .. U + 2FA1F, U + 2E80 .. U + 2EFF, U + 2F00 .. U + 2FDF, U + 3100 .. U + 312F, U + 31A0 .. U + 31BF, U + 3040 .. U + 309F, U + 30A0 .. U + 30FF, U + 31F0 .. U + 31FF, U + ac00 .. U + D7AF, U + 1100 .. U + 11FF, U + 3130 .. U + 318F, U + a000 .. U + A48F, U + a490 .. U + A4CF} # tblordernoindex src5 {source = src5 path =/usr/local/sphinx/var/data/src5 docinfo = extern dict = keywords mlock = 0 morphology = none min_word_len = 1 html_strip = 0 min_prefix_len = 0 # minimum prefix min_infix_len = 1 # minimum infix, support fuzzy query ngram_len = 1 # For non-letter data length cutting, support Chinese needs to be set to 1 ngram_chars = U + 3000 .. U + 2FA1F, U + 4E00 .. U + 9FBF, U + 3400 .. U + 4DBF, U + 20000 .. U + 2A6DF, U + f900 .. U + FAFF, U + 2F800 .. U + 2FA1F, U + 2E80 .. U + 2EFF, U + 2F00 .. U + 2FDF, U + 3100 .. U + 312F, U + 31A0 .. U + 31BF, U + 3040 .. U + 309F, U + 30A0 .. U + 30FF, U + 31F0 .. U + 31FF, U + ac00 .. U + D7AF, U + 1100 .. U + 11FF, U + 3130 .. U + 318F, U + a000 .. U + A48F, U + a490 .. U + A4CF }###### incremental index # tblprnindex src2_delta {source = src2_delta path =/usr/local/sphinx/var/data/src2_delta docinfo = extern dict = keywords mlock = 0 morphology = none min_word_len = 1 html_strip = 0 min_prefix_len = 0 # minimum prefix min_infix_len = 0 # minimum infix ngram_len = 1 # Cut the length of non-letter data, the supported Chinese characters must be set to 1 ngram_chars = U + 4E00 .. U + 9FBF, U + 3400 .. U + 4DBF, U + 20000 .. U + 2A6DF, U + f900 .. U + FAFF, U + 2F800 .. U + 2FA1F, U + 2E80 .. U + 2EFF, U + 2F00 .. U + 2FDF, U + 3100 .. U + 312F, U + 31A0 .. U + 31BF, U + 3040 .. U + 309F, U + 30A0 .. U + 30FF, U + 31F0 .. U + 31FF, U + ac00 .. U + D7AF, U + 1100 .. U + 11FF, U + 3130 .. U + 318F, U + a000 .. U + A48F, U + a490 .. U + A4CF} # tblticketnoindex src3_delta {source = src3_delta path =/usr/local/sphinx/var/data/src3_delta docinfo = extern dict = keywords mlock = 0 morphology = none min_word_len = html_strip = 0 min_prefix_len = 0 # minimum prefix min_infix_len = 0 # minimum infix ngram_len = 1 # Cut the length of non-letter data, the supported Chinese characters must be set to 1 ngram_chars = U + 4E00 .. U + 9FBF, U + 3400 .. U + 4DBF, U + 20000 .. U + 2A6DF, U + f900 .. U + FAFF, U + 2F800 .. U + 2FA1F, U + 2E80 .. U + 2EFF, U + 2F00 .. U + 2FDF, U + 3100 .. U + 312F, U + 31A0 .. U + 31BF, U + 3040 .. U + 309F, U + 30A0 .. U + 30FF, U + 31F0 .. U + 31FF, U + ac00 .. U + D7AF, U + 1100 .. U + 11FF, U + 3130 .. U + 318F, U + a000 .. U + A48F, U + a490 .. U + A4CF} # tblpassengernameindex src4_delta {source = src4_delta path =/usr/local/sph1_/ var/data/src4_delta docinfo = extern dict = keywords mlock = 0 morphology = none min_word_len = html_strip = 0 min_prefix_len = 0 # minimum prefix min_infix_len = 0 # minimum infix ngram_len = 1 # Cut the length of non-letter data, the supported Chinese characters must be set to 1 ngram_chars = U + 4E00 .. U + 9FBF, U + 3400 .. U + 4DBF, U + 20000 .. U + 2A6DF, U + f900 .. U + FAFF, U + 2F800 .. U + 2FA1F, U + 2E80 .. U + 2EFF, U + 2F00 .. U + 2FDF, U + 3100 .. U + 312F, U + 31A0 .. U + 31BF, U + 3040 .. U + 309F, U + 30A0 .. U + 30FF, U + 31F0 .. U + 31FF, U + ac00 .. U + D7AF, U + 1100 .. U + 11FF, U + 3130 .. U + 318F, U + a000 .. U + A48F, U + a490 .. U + A4CF} # tblordernoindex src5_delta {source = src5_delta path =/usr/local/sphinx/var/data/src5_delta docinfo = extern dict = keywords mlock = 0 morphology = none min_word_len = 1 html_strip = 0 min_prefix_len = 0 # minimum prefix min_infix_len = 1 # minimum infix, support fuzzy query ngram_len = 1 # For non-letter data length cutting, support Chinese needs to be set to 1 ngram_chars = U + 4E00 .. U + 9FBF, U + 3400 .. U + 4DBF, U + 20000 .. U + 2A6DF, U + f900 .. U + FAFF, U + 2F800 .. U + 2FA1F, U + 2E80 .. U + 2EFF, U + 2F00 .. U + 2FDF, U + 3100 .. U + 312F, U + 31A0 .. U + 31BF, U + 3040 .. U + 309F, U + 30A0 .. U + 30FF, U + 31F0 .. U + 31FF, U + ac00 .. U + D7AF, U + 1100 .. U + 11FF, U + 3130 .. U + 318F, U + a000 .. U + A48F, U + a490 .. U + A4CF }######## inherited index: index inheritance # tblpnr # index src2stemmed: src2 # {# path =/usr/local/sphinx/var/data/src2stemmed # morphology = stem_en #}# tblticketno # index src3stemmed: src3 # {# path =/usr/local/sphinx/var/data/src3stemmed # morphology = stem_en #}# tblpassengername # index src4stemmed: src4 # {# path =/usr/local/sphinx/var/data/src4stemmed # morphology = stem_en #}####### distributed search # tblpnrindex dist2 {type = distributed local = src2 local = src2_delta} # nvidist3 {type = distributed local = src3 local = src3_delta} # nvidist4 {type = distributed local = src4 local = src4_delta} # orderno: intpu value include *, not support dist query # index dist5 # {# type = distributed # local = src5 # local = src5_delta #} index rt {type = rt path =/usr/local/sphinx/var/ data/rt rt_field = title rt_field = content rt_attr_uint = gid} indexer {mem_limit = 1024 M} searchd {# listen =/var/run/searchd. sock listen = 127.0.0.1: 9312: sph1_listen = 9306: mysql41 listen = 192.168.0.128: 9312: sph1_log =/usr/local/sph1_/ var/log/searchd. log query_log =/usr/local/sphinx/var/log/query. log read_timeout = 5 client_timeout = 300 max_children = 30 persistent_connections_limit = 30 pid_file =/usr/local/sphmit/var/log/searchd. pid seamless_rotate = 1 ### whether seamless switching is supported, preopen_indexes = 1 unlink_old = 1 rows = 1 M max_packet_size = 8 M max_filters = 256 max_filter_values = 4096 max_batch_queries = 32 dist_threads = 2} common {}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.