Guest User

Untitled

a guest
Feb 18th, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.44 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 \
  17. #,regexp_replace(i.title,'~*[^a-zA-Z0-9 ]','','g') AS fix \
  18. FROM legacy.data_item i \
  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.  
  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 \
  43. #,regexp_replace(p.title,'~*[^a-zA-Z0-9 ]','','g') AS fix \
  44. FROM public.data_item p \
  45. LEFT JOIN legacy.data_group_type gt ON gt.type_id =p.type_id \
  46. LEFT JOIN legacy.data_group g ON g.id = gt.group_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_string = prefix
  53. sql_field_str2wordcount = title
  54. sql_attr_string = photo
  55. sql_attr_uint = base_price:12
  56. sql_attr_uint = base_quantity:4
  57. sql_attr_uint = fixed_price:12
  58. sql_attr_uint = in_store:4
  59. #sql_field_str2wordcount = model
  60. sql_attr_string = group_title
  61. sql_attr_uint = group_id:12
  62. sql_attr_string = manufactor
  63. }
  64.  
  65. index legacyIndex
  66. {
  67. source = legacySource
  68. path = /var/run/sphinx/legacySource/legacyIndex
  69. docinfo = extern
  70. mlock = 0
  71. morphology = stem_enru, soundex, metaphone
  72. charset_type = utf-8
  73.  
  74. charset_table = 0..9, A..Z->a..z, a..z,U+410..U+42F->U+430..U+44F, U+430..U+44F
  75. #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
  76. blend_chars = +, U+0024, U+0026, U+0028, U+0029, U+194, U+160, U+002F, U+005C, U+007C, U+005F, U+002D
  77. #blend_mode = trim_tail
  78. min_prefix_len = 0
  79. min_infix_len = 2
  80. enable_star = 1
  81. min_word_len = 2
  82. ngram_len = 1
  83. wordforms = /home/www/sphinx/wordforms.txt
  84. }
  85.  
  86. index publicIndex
  87. {
  88. source = publicSource
  89. path = /var/run/sphinx/publicSource/publicIndex
  90. docinfo = extern
  91. mlock = 0
  92. morphology = stem_enru, soundex, metaphone
  93. charset_type = utf-8
  94.  
  95. charset_table = 0..9, A..Z->a..z, a..z,U+410..U+42F->U+430..U+44F, U+430..U+44F
  96. #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
  97. blend_chars = +, U+0024, U+0026, U+0028, U+0029, U+194, U+160, U+002F, U+005C, U+007C, U+005F, U+002D
  98. #blend_mode = trim_tail
  99. min_prefix_len = 0
  100. min_infix_len = 2
  101. enable_star = 1
  102. min_word_len = 2
  103. ngram_len = 1
  104. wordforms = /home/www/sphinx/wordforms.txt
  105. }
  106.  
  107. indexer
  108. {
  109. mem_limit = 128M
  110. }
  111.  
  112. searchd
  113. {
  114. listen = 127.0.0.1
  115. port = 5000
  116. log = /home/www/sphinx/searchd.log
  117. query_log = /home/www/sphinx/query.log
  118. read_timeout = 2
  119. max_children = 32
  120. pid_file = /home/www/sphinx/searchd.pid
  121. }
Add Comment
Please, Sign In to add comment