Guest User

Untitled

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