Advertisement
Guest User

Untitled

a guest
Jul 13th, 2016
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.97 KB | None | 0 0
  1. source search_suggest
  2. {
  3. type = mysql
  4. sql_host = 127.0.0.1
  5. sql_user = root
  6. sql_pass = 123456
  7. sql_db = ihello_release
  8. sql_port = 3306
  9.  
  10. sql_query_pre = SET NAMES utf8
  11. sql_query = SELECT id, trigrams, freq, keyword, CHAR_LENGTH(keyword) AS len FROM search_suggests
  12.  
  13. sql_attr_uint = freq
  14. sql_attr_uint = len
  15. sql_attr_string = keyword
  16. }
  17.  
  18. source data_units
  19. {
  20. type = mysql
  21. sql_host = 127.0.0.1
  22. sql_user = root
  23. sql_pass = 123456
  24. sql_db = ihello_release
  25. sql_port = 3306
  26.  
  27. sql_query_pre = SET NAMES utf8
  28. sql_query = \
  29. SELECT \
  30. du.unitid, du.unitid as _id, du.amount, "unit" as `type`, du.catid as catid, 1 as available, \
  31. null AS parent_unit_id, min_price as price, \
  32. CONCAT(IFNULL(du.`name`, ''), ' ', IFNULL(du.sematype, ''), ' ', IFNULL(c.name, '')) AS keywords \
  33. FROM data_units du \
  34. LEFT JOIN `categories` c ON c.id = du.catid
  35.  
  36. sql_attr_uint = _id
  37. sql_attr_uint = amount
  38. sql_attr_uint = price
  39. sql_attr_uint = catid
  40. sql_attr_uint = parent_unit_id
  41. sql_attr_string = type
  42. sql_attr_uint = available
  43. }
  44.  
  45. source real_offers
  46. {
  47. type = mysql
  48. sql_host = 127.0.0.1
  49. sql_user = root
  50. sql_pass = 123456
  51. sql_db = ihello_release
  52. sql_port = 3306
  53.  
  54. sql_query_pre = SET NAMES utf8
  55. sql_query = \
  56. SELECT \
  57. ro.UID, ro.UID as _id, ro.amount, "offer" as `type`, ro.catid as catid, ro.available, \
  58. ro.unit_id AS parent_unit_id, cost as price, shop_id, shop_name, \
  59. CONCAT(IFNULL(ro.`unit_name`, ''), ' ', IFNULL(c.name, ''), ' ', IFNULL(ro.description, '')) AS keywords \
  60. FROM `real_offers` ro \
  61. LEFT JOIN `categories` c ON c.id = ro.catid
  62.  
  63. sql_attr_uint = _id
  64. sql_attr_uint = amount
  65. sql_attr_uint = price
  66. sql_attr_uint = catid
  67. sql_attr_uint = parent_unit_id
  68. sql_attr_uint = shop_id
  69. sql_attr_string = shop_name
  70. sql_attr_string = type
  71. sql_attr_uint = available
  72. }
  73.  
  74. source shops
  75. {
  76. type = mysql
  77. sql_host = 127.0.0.1
  78. sql_user = root
  79. sql_pass = 123456
  80. sql_db = ihello_import
  81. sql_port = 3306
  82.  
  83. sql_query_pre = SET NAMES utf8
  84. sql_query = \
  85. SELECT s.id, s.id as _id, "shop" as `type`, s.is_publicated, s.name AS name, \
  86. s.site_type, s.switched_off, s.local_city_id, s.reference_id, s.reference_source, s.logo, \
  87. s.delivery, s.phone, s.local_delivery_cost, s.email, s.has_cashback, \
  88. CONCAT(IFNULL(s.`name`, ''), ' ', IFNULL(s.http, '')) AS keywords \
  89. FROM `shops` as s
  90.  
  91. sql_attr_uint = _id
  92. sql_attr_uint = site_type
  93. sql_attr_uint = switched_off
  94. sql_attr_uint = local_city_id
  95. sql_attr_uint = is_publicated
  96. sql_attr_string = reference_id
  97. sql_attr_string = reference_source
  98. sql_attr_string = logo
  99. sql_attr_string = delivery
  100. sql_attr_string = phone
  101. sql_attr_string = local_delivery_cost
  102. sql_attr_uint = has_cashback
  103. sql_attr_string = type
  104. sql_attr_string = email
  105. sql_attr_string = name
  106. }
  107.  
  108. index data_units
  109. {
  110. source = data_units
  111. path = /var/sphinx/index/data_units
  112. morphology = stem_enru
  113. min_word_len = 2
  114.  
  115. charset_type = utf-8
  116. charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
  117. }
  118.  
  119. index search_suggest
  120. {
  121. source = search_suggest
  122. path = /var/sphinx/index/search_suggest
  123. morphology = stem_enru
  124. docinfo = extern
  125. }
  126.  
  127. index real_offers
  128. {
  129. source = real_offers
  130. path = /var/sphinx/index/real_offers
  131. morphology = stem_enru
  132. min_word_len = 2
  133.  
  134. charset_type = utf-8
  135. charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
  136. }
  137.  
  138. index shops
  139. {
  140. source = shops
  141. path = /var/sphinx/index/shops
  142. morphology = stem_enru
  143. min_word_len = 2
  144.  
  145. charset_type = utf-8
  146. charset_table = 0..9, A..Z->a..z, _, a..z, U+410..U+42F->U+430..U+44F, U+430..U+44F
  147. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement