Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- source product_documentation : base_sandbox
- {
- sql_query = \
- SELECT id, name, slug, title, description, product_review_title, published \
- FROM product
- sql_attr_string = slug
- sql_field_string = name
- sql_field_string = title
- sql_field_string = description
- sql_field_string = product_review_title
- sql_attr_uint = published
- }
- source product_documentation_eng : base_sandbox
- {
- sql_query = \
- SELECT id, name_eng, slug, title_eng, description_eng, product_review_title_eng, published_eng \
- FROM product
- sql_attr_string = slug
- sql_field_string = name_eng
- sql_field_string = title_eng
- sql_field_string = description_eng
- sql_field_string = product_review_title_eng
- sql_attr_uint = published_eng
- }
- source product_version : base_sandbox
- {
- sql_query = \
- SELECT pv.id as id, p.id as product_id, slug, name, pv.description as version_description, pv.published as published, p.published as product_published \
- FROM product_version pv \
- LEFT JOIN product p ON pv.id_product = p.id
- sql_attr_string = slug
- sql_attr_uint = product_id
- sql_field_string = name
- sql_field_string = version_description
- sql_attr_uint = published
- sql_attr_uint = product_published
- }
- source product_version_eng : base_sandbox
- {
- sql_query = \
- SELECT pv.id as id, p.id as product_id, slug, name_eng, pv.description_eng as version_description_eng, pv.published_eng as published_eng, p.published_eng as product_published_eng \
- FROM product_version pv \
- LEFT JOIN product p ON pv.id_product = p.id
- sql_attr_string = slug
- sql_attr_uint = product_id
- sql_field_string = name_eng
- sql_field_string = version_description_eng
- sql_attr_uint = published_eng
- sql_attr_uint = product_published_eng
- }
- source product_support : base_sandbox
- {
- sql_query = \
- SELECT id, name, slug, support_phone, support_email, support, published \
- FROM product
- sql_attr_string = slug
- sql_field_string = name
- sql_field_string = support_phone
- sql_field_string = support_email
- sql_field_string = support
- sql_attr_uint = published
- }
- source product_support_eng : base_sandbox
- {
- sql_query = \
- SELECT id, name_eng, slug, support_phone_eng, support_email_eng, support_eng, published_eng \
- FROM product
- sql_attr_string = slug
- sql_field_string = name_eng
- sql_field_string = support_phone_eng
- sql_field_string = support_email_eng
- sql_field_string = support_eng
- sql_attr_uint = published_eng
- }
- source method : base_sandbox
- {
- sql_query = \
- SELECT m.id, p.id as product_id, type, address, m.name as name, p.name as product_name, ps.name as section_name, p.slug as product_slug, ps.slug as section_slug, m.slug as slug, m.description as description, method_params, types_table, m.published as published, ps.published as section_published, p.published as product_published, p.current_version_id as current_version_id, ps.version_id as version_id \
- FROM method m \
- LEFT JOIN product_section ps ON m.id_section = ps.id \
- LEFT JOIN product p ON ps.id_product = p.id
- sql_attr_uint = product_id
- sql_attr_uint = current_version_id
- sql_attr_uint = version_id
- sql_attr_string = slug
- sql_attr_string = product_slug
- sql_attr_string = section_slug
- sql_field_string = product_name
- sql_field_string = section_name
- sql_field_string = type
- sql_field_string = address
- sql_field_string = name
- sql_field_string = description
- sql_field_string = method_params
- sql_field_string = types_table
- sql_attr_uint = published
- sql_attr_uint = section_published
- sql_attr_uint = product_published
- }
- source method_eng : base_sandbox
- {
- sql_query = \
- SELECT m.id, p.id as product_id, type, address, m.name_eng as name_eng, p.name_eng as product_name_eng, ps.name_eng as section_name_eng, p.slug as product_slug, ps.slug as section_slug, m.slug as slug, m.description_eng as description_eng, method_params_eng, types_table_eng, m.published_eng as published_eng, ps.published_eng as section_published_eng, p.published_eng as product_published_eng, p.current_version_eng_id as current_version_eng_id, ps.version_id as version_id \
- FROM method m \
- LEFT JOIN product_section ps ON m.id_section = ps.id \
- LEFT JOIN product p ON ps.id_product = p.id
- sql_attr_uint = product_id
- sql_attr_uint = current_version_eng_id
- sql_attr_uint = version_id
- sql_attr_string = slug
- sql_attr_string = product_slug
- sql_attr_string = section_slug
- sql_field_string = product_name_eng
- sql_field_string = section_name_eng
- sql_field_string = type
- sql_field_string = address
- sql_field_string = name_eng
- sql_field_string = description_eng
- sql_field_string = method_params_eng
- sql_field_string = types_table_eng
- sql_attr_uint = published_eng
- sql_attr_uint = section_published_eng
- sql_attr_uint = product_published_eng
- }
- #############################################################################
- ## index definition
- #############################################################################
- index sandbox_product_documentation_index
- {
- source = product_documentation
- path = /var/lib/sphinx/data/product_documentation_index
- docinfo = extern
- dict = keywords
- mlock = 0
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- }
- index sandbox_product_documentation_eng_index
- {
- source = product_documentation_eng
- path = /var/lib/sphinx/data/product_documentation_eng_index
- docinfo = extern
- dict = keywords
- mlock = 0
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- }
- index sandbox_product_version_index
- {
- source = product_version
- path = /var/lib/sphinx/data/product_version_index
- docinfo = extern
- dict = keywords
- mlock = 0
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- }
- index sandbox_product_version_eng_index
- {
- source = product_version_eng
- path = /var/lib/sphinx/data/product_version_eng_index
- docinfo = extern
- dict = keywords
- mlock = 0
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- }
- index sandbox_product_support_index
- {
- source = product_support
- path = /var/lib/sphinx/data/product_support_index
- docinfo = extern
- dict = keywords
- mlock = 0
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- }
- index sandbox_product_support_eng_index
- {
- source = product_support_eng
- path = /var/lib/sphinx/data/product_support_eng_index
- docinfo = extern
- dict = keywords
- mlock = 0
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- }
- index sandbox_method_index
- {
- source = method
- path = /var/lib/sphinx/data/method_index
- docinfo = extern
- dict = keywords
- mlock = 0
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- }
- index sandbox_method_eng_index
- {
- source = method_eng
- path = /var/lib/sphinx/data/method_eng_index
- docinfo = extern
- dict = keywords
- mlock = 0
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- }
- index sandbox_product_documentation_rt
- {
- type = rt
- path = /var/lib/sphinx/data/product_documentation_rt
- docinfo = extern
- dict = keywords
- mlock = 0
- rt_mem_limit = 512M
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- rt_attr_string = slug
- rt_field = name
- rt_field = title
- rt_field = description
- rt_field = product_review_title
- rt_attr_uint = published
- }
- index sandbox_product_documentation_eng_rt
- {
- type = rt
- path = /var/lib/sphinx/data/product_documentation_eng_rt
- docinfo = extern
- dict = keywords
- mlock = 0
- rt_mem_limit = 512M
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- rt_attr_string = slug
- rt_field = name_eng
- rt_field = title_eng
- rt_field = description_eng
- rt_field = product_review_title_eng
- rt_attr_uint = published_eng
- }
- index sandbox_product_version_rt
- {
- type = rt
- path = /var/lib/sphinx/data/product_version_rt
- docinfo = extern
- dict = keywords
- mlock = 0
- rt_mem_limit = 512M
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- rt_attr_string = slug
- rt_attr_uint = product_id
- rt_field = name
- rt_field = version_description
- rt_attr_uint = published
- rt_attr_uint = product_published
- }
- index sandbox_product_version_eng_rt
- {
- type = rt
- path = /var/lib/sphinx/data/product_version_eng_rt
- docinfo = extern
- dict = keywords
- mlock = 0
- rt_mem_limit = 512M
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- rt_attr_string = slug
- rt_attr_uint = product_id
- rt_field = name_eng
- rt_field = version_description_eng
- rt_attr_uint = published_eng
- rt_attr_uint = product_published_eng
- }
- index sandbox_product_support_rt
- {
- type = rt
- path = /var/lib/sphinx/data/product_support_rt
- docinfo = extern
- dict = keywords
- mlock = 0
- rt_mem_limit = 512M
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- rt_attr_string = slug
- rt_field = name
- rt_field = support_phone
- rt_field = support_email
- rt_field = support
- rt_attr_uint = published
- }
- index sandbox_product_support_eng_rt
- {
- type = rt
- path = /var/lib/sphinx/data/product_support_eng_rt
- docinfo = extern
- dict = keywords
- mlock = 0
- rt_mem_limit = 512M
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- rt_attr_string = slug
- rt_field = name_eng
- rt_field = support_phone_eng
- rt_field = support_email_eng
- rt_field = support_eng
- rt_attr_uint = published_eng
- }
- index sandbox_method_rt
- {
- type = rt
- path = /var/lib/sphinx/data/method_rt
- docinfo = extern
- dict = keywords
- mlock = 0
- rt_mem_limit = 512M
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- rt_attr_uint = product_id
- rt_attr_uint = current_version_id
- rt_attr_uint = version_id
- rt_attr_string = slug
- rt_attr_string = product_slug
- rt_attr_string = section_slug
- rt_field = product_name
- rt_field = section_name
- rt_field = type
- rt_field = address
- rt_field = name
- rt_field = description
- rt_field = method_params
- rt_field = types_table
- rt_attr_uint = published
- rt_attr_uint = section_published
- rt_attr_uint = product_published
- }
- index sandbox_method_eng_rt
- {
- type = rt
- path = /var/lib/sphinx/data/method_eng_rt
- docinfo = extern
- dict = keywords
- mlock = 0
- rt_mem_limit = 512M
- morphology = stem_enru
- min_stemming_len = 3
- charset_table = 0..9, A..Z->a..z, _, a..z, \
- U+410..U+42F->U+430..U+44F, U+430..U+44F, U+401->U+0435, U+451->U+0435
- min_word_len = 2
- min_infix_len = 3
- html_strip = 1
- rt_attr_uint = product_id
- rt_attr_uint = current_version_eng_id
- rt_attr_uint = version_id
- rt_attr_string = slug
- rt_attr_string = product_slug
- rt_attr_string = section_slug
- rt_field = product_name_eng
- rt_field = section_name_eng
- rt_field = type
- rt_field = address
- rt_field = name_eng
- rt_field = description_eng
- rt_field = method_params_eng
- rt_field = types_table_eng
- rt_attr_uint = published_eng
- rt_attr_uint = section_published_eng
- rt_attr_uint = product_published_eng
- }
- #############################################################################
- ## indexer settings
- #############################################################################
- indexer
- {
- # memory limit, in bytes, kiloytes (16384K) or megabytes (256M)
- # optional, default is 128M, max is 2047M, recommended is 256M to 1024M
- mem_limit = 128M
- # maximum IO calls per second (for I/O throttling)
- # optional, default is 0 (unlimited)
- #
- # max_iops = 40
- # maximum IO call size, bytes (for I/O throttling)
- # optional, default is 0 (unlimited)
- #
- # max_iosize = 1048576
- # maximum xmlpipe2 field length, bytes
- # optional, default is 2M
- #
- # max_xmlpipe2_field = 4M
- # write buffer size, bytes
- # several (currently up to 4) buffers will be allocated
- # write buffers are allocated in addition to mem_limit
- # optional, default is 1M
- #
- # write_buffer = 1M
- # maximum file field adaptive buffer size
- # optional, default is 8M, minimum is 1M
- #
- # max_file_field_buffer = 32M
- # how to handle IO errors in file fields
- # known values are 'ignore_field', 'skip_document', and 'fail_index'
- # optional, default is 'ignore_field'
- #
- # on_file_field_error = skip_document
- # lemmatizer cache size
- # improves the indexing time when the lemmatization is enabled
- # optional, default is 256K
- #
- # lemmatizer_cache = 512M
- }
- #############################################################################
- ## searchd settings
- #############################################################################
- searchd
- {
- # [hostname:]port[:protocol], or /unix/socket/path to listen on
- # known protocols are 'sphinx' (SphinxAPI) and 'mysql41' (SphinxQL)
- #
- # multi-value, multiple listen points are allowed
- # optional, defaults are 9312:sphinx and 9306:mysql41, as below
- #
- # listen = 127.0.0.1
- # listen = localhost:9312
- # listen = 9312
- # listen = /var/run/searchd.sock
- listen = 9313
- listen = 127.0.0.1:9307:mysql41
- # log file, searchd run info is logged here
- # optional, default is 'searchd.log'
- log = /var/log/sphinx/searchd.log
- # query log file, all search queries are logged here
- # optional, default is empty (do not log queries)
- query_log = /var/log/sphinx/query.log
- # client read timeout, seconds
- # optional, default is 5
- read_timeout = 5
- # request timeout, seconds
- # optional, default is 5 minutes
- client_timeout = 300
- # maximum amount of children to fork (concurrent searches to run)
- # optional, default is 0 (unlimited)
- max_children = 30
- # maximum amount of persistent connections from this master to each agent host
- # optional, but necessary if you use agent_persistent. It is reasonable to set the value
- # as max_children, or less on the agent's hosts.
- persistent_connections_limit = 30
- # PID file, searchd process ID file name
- # mandatory
- pid_file = /var/run/sphinx/searchd.pid
- # seamless rotate, prevents rotate stalls if precaching huge datasets
- # optional, default is 1
- seamless_rotate = 1
- # whether to forcibly preopen all indexes on startup
- # optional, default is 1 (preopen everything)
- preopen_indexes = 1
- # whether to unlink .old index copies on succesful rotation.
- # optional, default is 1 (do unlink)
- unlink_old = 1
- # attribute updates periodic flush timeout, seconds
- # updates will be automatically dumped to disk this frequently
- # optional, default is 0 (disable periodic flush)
- #
- # attr_flush_period = 900
- # MVA updates pool size
- # shared between all instances of searchd, disables attr flushes!
- # optional, default size is 1M
- mva_updates_pool = 1M
- # max allowed network packet size
- # limits both query packets from clients, and responses from agents
- # optional, default size is 8M
- max_packet_size = 8M
- # max allowed per-query filter count
- # optional, default is 256
- max_filters = 256
- # max allowed per-filter values count
- # optional, default is 4096
- max_filter_values = 4096
- # socket listen queue length
- # optional, default is 5
- #
- # listen_backlog = 5
- # per-keyword read buffer size
- # optional, default is 256K
- #
- # read_buffer = 256K
- # unhinted read size (currently used when reading hits)
- # optional, default is 32K
- #
- # read_unhinted = 32K
- # max allowed per-batch query count (aka multi-query count)
- # optional, default is 32
- max_batch_queries = 32
- # max common subtree document cache size, per-query
- # optional, default is 0 (disable subtree optimization)
- #
- # subtree_docs_cache = 4M
- # max common subtree hit cache size, per-query
- # optional, default is 0 (disable subtree optimization)
- #
- # subtree_hits_cache = 8M
- # multi-processing mode (MPM)
- # known values are none, fork, prefork, and threads
- # threads is required for RT backend to work
- # optional, default is threads
- workers = threads # for RT to work
- # max threads to create for searching local parts of a distributed index
- # optional, default is 0, which means disable multi-threaded searching
- # should work with all MPMs (ie. does NOT require workers=threads)
- #
- # dist_threads = 4
- # binlog files path; use empty string to disable binlog
- # optional, default is build-time configured data directory
- #
- # binlog_path = # disable logging
- # binlog_path = /var/lib/sphinx/data # binlog.001 etc will be created there
- binlog_path = /var/lib/sphinx/data # binlog.001 etc will be created there
- # binlog flush/sync mode
- # 0 means flush and sync every second
- # 1 means flush and sync every transaction
- # 2 means flush every transaction, sync every second
- # optional, default is 2
- #
- # binlog_flush = 2
- # binlog per-file size limit
- # optional, default is 128M, 0 means no limit
- #
- # binlog_max_log_size = 256M
- # per-thread stack size, only affects workers=threads mode
- # optional, default is 64K
- #
- # thread_stack = 128K
- # per-keyword expansion limit (for dict=keywords prefix searches)
- # optional, default is 0 (no limit)
- #
- # expansion_limit = 1000
- # RT RAM chunks flush period
- # optional, default is 0 (no periodic flush)
- #
- # rt_flush_period = 900
- # query log file format
- # optional, known values are plain and sphinxql, default is plain
- #
- # query_log_format = sphinxql
- # version string returned to MySQL network protocol clients
- # optional, default is empty (use Sphinx version)
- #
- # mysql_version_string = 5.0.37
- # default server-wide collation
- # optional, default is libc_ci
- #
- # collation_server = utf8_general_ci
- # server-wide locale for libc based collations
- # optional, default is C
- #
- # collation_libc_locale = ru_RU.UTF-8
- # threaded server watchdog (only used in workers=threads mode)
- # optional, values are 0 and 1, default is 1 (watchdog on)
- #
- # watchdog = 1
- # costs for max_predicted_time model, in (imaginary) nanoseconds
- # optional, default is "doc=64, hit=48, skip=2048, match=64"
- #
- # predicted_time_costs = doc=64, hit=48, skip=2048, match=64
- # current SphinxQL state (uservars etc) serialization path
- # optional, default is none (do not serialize SphinxQL state)
- #
- # sphinxql_state = sphinxvars.sql
- # maximum RT merge thread IO calls per second, and per-call IO size
- # useful for throttling (the background) OPTIMIZE INDEX impact
- # optional, default is 0 (unlimited)
- #
- # rt_merge_iops = 40
- # rt_merge_maxiosize = 1M
- # interval between agent mirror pings, in milliseconds
- # 0 means disable pings
- # optional, default is 1000
- #
- # ha_ping_interval = 0
- # agent mirror statistics window size, in seconds
- # stats older than the window size (karma) are retired
- # that is, they will not affect master choice of agents in any way
- # optional, default is 60 seconds
- #
- # ha_period_karma = 60
- # delay between preforked children restarts on rotation, in milliseconds
- # optional, default is 0 (no delay)
- #
- # prefork_rotation_throttle = 100
- # a prefix to prepend to the local file names when creating snippets
- # with load_files and/or load_files_scatter options
- # optional, default is empty
- #
- # snippets_file_prefix = /mnt/common/server1/
- }
- #############################################################################
- ## common settings
- #############################################################################
- common
- {
- # lemmatizer dictionaries base path
- # optional, defaut is /usr/local/share (see ./configure --datadir)
- #
- # lemmatizer_base = /usr/local/share/sphinx/dicts
- # how to handle syntax errors in JSON attributes
- # known values are 'ignore_attr' and 'fail_index'
- # optional, default is 'ignore_attr'
- #
- # on_json_attr_error = fail_index
- # whether to auto-convert numeric values from strings in JSON attributes
- # with auto-conversion, string value with actually numeric data
- # (as in {"key":"12345"}) gets stored as a number, rather than string
- # optional, allowed values are 0 and 1, default is 0 (do not convert)
- #
- # json_autoconv_numbers = 1
- # whether and how to auto-convert key names in JSON attributes
- # known value is 'lowercase'
- # optional, default is unspecified (do nothing)
- #
- # json_autoconv_keynames = lowercase
- # path to RLP root directory
- # optional, defaut is /usr/local/share (see ./configure --datadir)
- #
- # rlp_root = /usr/local/share/sphinx/rlp
- # path to RLP environment file
- # optional, defaut is /usr/local/share/rlp-environment.xml (see ./configure --datadir)
- #
- # rlp_environment = /usr/local/share/sphinx/rlp/rlp/etc/rlp-environment.xml
- # maximum total size of documents batched before processing them by the RLP
- # optional, default is 51200
- #
- # rlp_max_batch_size = 100k
- # maximum number of documents batched before processing them by the RLP
- # optional, default is 50
- #
- # rlp_max_batch_docs = 100
- # trusted plugin directory
- # optional, default is empty (disable UDFs)
- #
- # plugin_dir = /usr/local/sphinx/lib
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement