Guest User

Untitled

a guest
Jan 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 3.87 KB | None | 0 0
  1. SOURCE application
  2. {
  3.     TYPE = pgsql
  4.     sql_host = 192.168.1.2
  5.     sql_user = www
  6.     sql_pass = ghjcnjq
  7.     sql_db = shop
  8.     sql_port = 5432
  9.     sql_query_pre = SET NAMES 'utf-8'
  10. }
  11.  
  12. SOURCE legacySource : application
  13. {
  14.     sql_query = \
  15.         SELECT i.id, 'i' AS prefix, i.title, i.photo, i.base_price, i.base_quantity, i.fixed_price, \
  16.         i.in_store, i.model, g.title AS group_title, g.id AS group_id, m.title AS manufactor \
  17.         FROM legacy.data_item i \
  18.         LEFT JOIN legacy.data_manufactor m ON i.manufactor_id = m.id \
  19.         LEFT JOIN legacy.data_group g ON g.id = i.parent_id \
  20.         WHERE i.id BETWEEN $start AND $end AND g.STATUS = 1
  21.  
  22.     sql_query_range = SELECT MIN(id),MAX(id) FROM legacy.data_item
  23.     sql_range_step = 10000
  24.  
  25.     sql_attr_string = prefix
  26.     sql_field_str2wordcount = title
  27.     sql_attr_string = photo
  28.     sql_attr_uint = base_price:12
  29.     sql_attr_uint = base_quantity:4
  30.     sql_attr_uint = fixed_price:12
  31.     sql_attr_uint = in_store:4
  32.     sql_field_str2wordcount = model
  33.     sql_attr_string = group_title
  34.     sql_attr_uint = group_id:12
  35.     sql_attr_string = manufactor
  36. }
  37.  
  38. SOURCE publicSource : application
  39. {
  40.     sql_query = \
  41.         SELECT p.id, 'p' AS prefix, p.title, p.photo, p.base_price, p.base_quantity, p.fixed_price, \
  42.         p.in_store, p.model, g.title AS group_title, g.id AS group_id, l.VALUE AS manufactor \
  43.         FROM public.data_item p \
  44.         LEFT JOIN legacy.data_group_type gt ON gt.type_id = p.type_id \
  45.         LEFT JOIN legacy.data_group g ON g.id = gt.group_id \
  46.         LEFT JOIN public.data_item_feature f ON  f.item_id=p.id AND f.feature_id=2 \
  47.         LEFT JOIN public.data_feature_list l ON f.VALUE::INT=l.id AND l.feature_id=f.feature_id \
  48.         WHERE p.id BETWEEN $start AND $end AND g.STATUS = 1
  49.  
  50.     sql_query_range = SELECT MIN(id),MAX(id) FROM public.data_item
  51.     sql_range_step = 10000
  52.  
  53.     sql_attr_string = prefix
  54.     sql_field_str2wordcount = title
  55.     sql_attr_string = photo
  56.     sql_attr_uint = base_price:12
  57.     sql_attr_uint = base_quantity:4
  58.     sql_attr_uint = fixed_price:12
  59.     sql_attr_uint = in_store:4
  60.     sql_field_str2wordcount = model
  61.     sql_attr_string = group_title
  62.     sql_attr_uint = group_id:12
  63.     sql_attr_string = manufactor
  64. }
  65.  
  66. INDEX legacyIndex
  67. {
  68.     SOURCE = legacySource
  69.     path = /var/run/sphinx/legacySource/legacyIndex
  70.     docinfo = extern
  71.     mlock = 0
  72.     morphology = stem_ru
  73.     charset_type = utf-8
  74.  
  75.     charset_table = 0..9, A..Z->a..z, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
  76.     #ignore_chars = U+AD,U+2D,U+27,U+22,U+2B,U+3D,U+3E,U+3F,U+3C,U+3B,U+3A,U+2F,U+2E,U+2C,U+2A,U+20..U+29, \
  77.     #!,@,#,$,%,^,&,*,(,),_,+,|,\,/,=,-,`,~,',",},{,],[,;,:,<,>,?
  78.     blend_chars = U+AD,U+2D,U+27,U+22,U+2B,U+3D,U+3E,U+3F,U+3C,U+3B,U+3A,U+2F,U+2E,U+2C,U+2A,U+20..U+29, \
  79.     !,@,#,$,%,^,&,*,(,),_,+,|,\,/,=,`,~,',",},{,],[,;,:,<,>
  80.     ignor_chars = -,.,?
  81.     blend_mode = trim_tail, skip_pure
  82.     min_prefix_len = 0
  83.    min_infix_len = 3
  84.     enable_star = 1
  85.     wordforms = /home/www/wahu.ru/files/sphinx/wordforms.txt
  86. }
  87.  
  88. index publicIndex
  89. {
  90.     source = publicSource
  91.     path = /var/run/sphinx/publicSource/publicIndex
  92.     docinfo = extern
  93.     mlock = 0
  94.     morphology = stem_ru
  95.     charset_type = utf-8
  96.  
  97.     charset_table = 0..9, A..Z->a..z, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
  98.     #ignore_chars = U+AD,U+2D,U+27,U+22,U+2B,U+3D,U+3E,U+3F,U+3C,U+3B,U+3A,U+2F,U+2E,U+2C,U+2A,U+20..U+29, \
  99.     #!,@,#,$,%,^,&,*,(,),_,+,|,\,/,=,-,`,~,',",},{,],[,;,:,<,>,?
  100.     blend_chars = U+AD,U+2D,U+27,U+22,U+2B,U+3D,U+3E,U+3F,U+3C,U+3B,U+3A,U+2F,U+2E,U+2C,U+2A,U+20..U+29, \
  101.     !,@,#,$,%,^,&,*,(,),_,+,|,\,/,=,`,~,',",},{,],[,;,:,<,>
  102.     ignor_chars = -,.,?
  103.     blend_mode = trim_tail, skip_pure
  104.     min_prefix_len = 0
  105.     min_infix_len = 3
  106.     enable_star = 1
  107.     wordforms = /home/www/wahu.ru/files/sphinx/wordforms.txt
  108. }
  109.  
  110. indexer
  111. {
  112.     mem_limit = 128M
  113. }
  114.  
  115. searchd
  116. {
  117.     listen = 127.0.0.1
  118.     port = 5000
  119.     log = /home/www/wahu.ru/files/sphinx/searchd.log
  120.     query_log = /home/www/wahu.ru/files/sphinx/query.log
  121.     read_timeout = 2
  122.     max_children = 32
  123.     pid_file = /home/www/wahu.ru/files/sphinx/searchd.pid
  124. }
Add Comment
Please, Sign In to add comment