############################################################################# ## source definition ############################################################################# source beunishop { type = mysql ### sql_host = localhost sql_user = bogdan sql_pass = ethae5ua5aiQuew sql_db = beuni.com.ua sql_port = 3306 # optional, default is 3306 ### # sql_sock = /tmp/mysql.sock sql_query_pre = SET NAMES utf8 sql_query_pre = SET CHARACTER SET utf8 sql_query_pre = SET SESSION query_cache_type=OFF sql_query =\ SELECT id \ FROM fv_catalog_product } source beuni_products : beunishop{ sql_query = \ SELECT id,manufacturer_id,manufacturer_trademark_id,sku,alias,price,title,info,content \ FROM fv_catalog_product, fv_catalog_product_lang \ WHERE fv_catalog_product.id = fv_catalog_product_lang.rid AND \ fv_catalog_product.published='1' AND fv_catalog_product.deleted='0' \ AND id>=$start AND id<=$end sql_query_range = \ SELECT MIN(id),MAX(id) \ FROM fv_catalog_product, fv_catalog_product_lang \ WHERE fv_catalog_product.id = fv_catalog_product_lang.rid AND \ fv_catalog_product.published='1' AND fv_catalog_product.deleted='0' sql_range_step = 1000 sql_attr_uint = manufacturer_id sql_attr_uint = manufacturer_trademark_id sql_attr_float = price sql_field_string = sku sql_field_string = title } ############################################################################# ## index definition ############################################################################# index beunishop { type = plain source = beunishop path = /var/lib/sphinxsearch/data/beunishop docinfo = extern dict = keywords mlock = 0 ### # a list of morphology preprocessors to apply # builtin preprocessors are 'none', 'stem_en', 'stem_ru', 'stem_enru', # morphology = stem_en, stem_ru, soundex # morphology = libstemmer_german # morphology = libstemmer_sv morphology = stem_en, stem_ru, soundex index_exact_words=1 # default is 1 (index everything) min_word_len = 1 # minimum word prefix length to index # min_prefix_len = 1 # minimum word infix length to index min_infix_len = 1 # maximum substring (prefix or infix) length to index # max_substring_len = 8 html_strip = 0 expand_keywords = 1 } index beuni_products : beunishop{ path = /var/lib/sphinxsearch/data/beuni_products source = beuni_products morphology = stem_en, stem_ru, soundex } ############################################################################# ## indexer settings ############################################################################# indexer { # optional, default is 128M, max is 2047M, recommended is 256M to 1024M mem_limit = 256M } ############################################################################# ## searchd settings ############################################################################# searchd { listen = 9312 listen = 9306:mysql41 log = /var/log/sphinxsearch/searchd.log query_log = /var/log/sphinxsearch/query.log # client read timeout, seconds read_timeout = 5 # request timeout, seconds # optional, default is 5 minutes client_timeout = 300 # maximum amount of children to fork (concurrent searches to run) max_children = 30 # maximum amount of persistent connections from this master to each agent host persistent_connections_limit = 30 # PID file, searchd process ID file name pid_file = /var/run/sphinxsearch/searchd.pid # seamless rotate, prevents rotate stalls if precaching huge datasets seamless_rotate = 1 # whether to forcibly preopen all indexes on startup preopen_indexes = 1 # whether to unlink .old index copies on succesful rotation. # optional, default is 1 (do unlink) unlink_old = 1 # MVA updates pool size mva_updates_pool = 1M # max allowed network packet size max_packet_size = 8M # max allowed per-query filter count max_filters = 256 # max allowed per-filter values count max_filter_values = 4096 # max allowed per-batch query count (aka multi-query count) # optional, default is 32 max_batch_queries = 32 # multi-processing mode (MPM) workers = threads # for RT to work collation_server = utf8_general_ci # server-wide locale for libc based collations # collation_libc_locale = ru_RU.UTF-8 }