Guest User

Untitled

a guest
Jan 26th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.33 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 = 7000
  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 = 7000
  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. blend_chars = +, &->+
  78. min_infix_len = 4
  79. enable_star = 1
  80. min_word_len = 3
  81. #ngram_len = 1
  82. wordforms = /home/www/wahu.ru/files/sphinx/wordforms.txt
  83. }
  84.  
  85. index publicIndex
  86. {
  87. source = publicSource
  88. path = /var/run/sphinx/publicSource/publicIndex
  89. docinfo = extern
  90. mlock = 0
  91. morphology = stem_ru
  92. charset_type = utf-8
  93.  
  94. charset_table = 0..9, A..Z->a..z, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
  95. #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
  96. blend_chars = +, &->+
  97. min_infix_len = 4
  98. enable_star = 1
  99. min_word_len = 3
  100. #ngram_len = 1
  101. wordforms = /home/www/wahu.ru/files/sphinx/wordforms.txt
  102. }
  103.  
  104. indexer
  105. {
  106. mem_limit = 128M
  107. }
  108.  
  109. searchd
  110. {
  111. listen = 127.0.0.1
  112. port = 5000
  113. log = /home/www/wahu.ru/files/sphinx/searchd.log
  114. query_log = /home/www/wahu.ru/files/sphinx/query.log
  115. read_timeout = 2
  116. max_children = 32
  117. }
Add Comment
Please, Sign In to add comment