Guest User

Untitled

a guest
Jan 25th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 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.  
  13. source legacySource : application
  14. {
  15. sql_query = \
  16. SELECT i.id, 'i' AS prefix, i.title, i.photo, i.base_price, i.base_quantity, i.fixed_price, 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 = 5000
  24. #sql_attr_uint = id
  25. sql_attr_string = prefix
  26. sql_field_str2wordcount = title
  27. sql_attr_string = photo
  28. sql_attr_uint = base_price
  29. sql_attr_uint = base_quantity
  30. sql_attr_uint = fixed_price
  31. sql_attr_uint = in_store
  32. sql_field_str2wordcount = model
  33. sql_field_str2wordcount = group_title
  34. sql_attr_uint = group_id
  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, p.in_store, p.model, g.title AS group_title, g.id AS group_id, l.value as manufactor \
  42. FROM public.data_item p \
  43. LEFT JOIN legacy.data_group_type gt ON gt.type_id = p.type_id \
  44. LEFT JOIN legacy.data_group g ON g.id = gt.group_id \
  45. LEFT JOIN public.data_item_feature f ON f.item_id=p.id AND f.feature_id=2 \
  46. LEFT JOIN public.data_feature_list l ON f.value::int=l.id AND l.feature_id=f.feature_id \
  47. WHERE p.id BETWEEN $start AND $end AND g.status = 1
  48.  
  49. sql_query_range = SELECT MIN(id),MAX(id) FROM public.data_item
  50. sql_range_step = 5000
  51.  
  52. #sql_attr_uint = id
  53. sql_attr_string = prefix
  54. sql_field_str2wordcount = title
  55. sql_attr_string = photo
  56. sql_attr_uint = base_price
  57. sql_attr_uint = base_quantity
  58. sql_attr_uint = fixed_price
  59. sql_attr_uint = in_store
  60. sql_field_str2wordcount = model
  61. sql_field_str2wordcount = group_title
  62. sql_attr_uint = group_id
  63. sql_attr_string = manufactor
  64. }
  65.  
  66.  
  67. index legacyIndex
  68. {
  69. source = legacySource
  70. path = /var/run/sphinx/legacySource/legacyIndex
  71. docinfo = extern
  72. mlock = 0
  73. morphology = stem_enru, soundex, metaphone
  74. charset_type = utf-8
  75. html_strip = 1
  76. }
  77.  
  78. index publicIndex
  79. {
  80. source = publicSource
  81. path = /var/run/sphinx/publicSource/publicIndex
  82. docinfo = extern
  83. mlock = 0
  84. morphology = stem_enru, soundex, metaphone
  85. charset_type = utf-8
  86. html_strip = 1
  87. }
  88.  
  89. indexer
  90. {
  91. mem_limit = 64M
  92. }
  93.  
  94. searchd
  95. {
  96. listen = 127.0.0.1
  97. port = 5000
  98. log = /var/log/sphinx/searchd.log
  99. query_log = /var/log/sphinx/query.log
  100. read_timeout = 5
  101. max_children = 30
  102. pid_file = /var/log/sphinx/searchd.pid
  103. }
Add Comment
Please, Sign In to add comment