Advertisement
Guest User

Untitled

a guest
Oct 8th, 2011
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. Настройки индексации:
  2. source tstSrc
  3. {
  4. type = mysql
  5.  
  6. sql_host = 127.0.0.1
  7. sql_user = ****
  8. sql_pass = ****
  9. sql_db = dbt
  10. sql_port = 3306 # optional, default is 3306
  11.  
  12. sql_query_pre = SET NAMES utf8
  13. sql_query_pre = SET SESSION query_cache_type=OFF
  14.  
  15.  
  16. sql_query = \
  17. SELECT id, text \
  18. FROM products
  19.  
  20. sql_ranged_throttle = 0
  21.  
  22. sql_query_info = SELECT * FROM products WHERE id=$id
  23.  
  24. }
  25.  
  26. index products
  27. {
  28. type = plain
  29. source = tstSrc
  30. path = /opt/sphinx/tst
  31. docinfo = extern
  32. mlock = 1
  33. morphology = stem_enru
  34. min_stemming_len = 2
  35. min_word_len = 1
  36. charset_type = utf-8
  37. html_strip = 1
  38. preopen = 1
  39. ondisk_dict = 0
  40. inplace_enable = 1
  41. }
  42.  
  43.  
  44. Содержимое таблицы:
  45. mysql> select * from products;
  46. +----+-----------------------------------------+
  47. | id | text |
  48. +----+-----------------------------------------+
  49. | 1 | InterTech2011400WBeigeblue |
  50. | 2 | GressoC3035350WBlacksilver |
  51. | 3 | ПатчкордNoname15мUTP15м5еcat |
  52. | 4 | michelinxMaxiTrailer129127j |
  53. +----+-----------------------------------------+
  54. 4 rows in set (0.00 sec)
  55.  
  56.  
  57.  
  58. Результаты поиска:
  59. $ search -i products -e "@text \"^ПатчкордNoname15мUTP15м5еcat$\""
  60. Sphinx 1.11-dev (r2763)
  61. Copyright (c) 2001-2011, Andrew Aksyonoff
  62. Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com)
  63.  
  64. using config file '/usr/local/etc/sphinx.conf'...
  65. index 'products': query '@text "^ПатчкордNoname15мUTP15м5еcat$" ': returned 1 matches of 1 total in 0.000 sec
  66.  
  67. displaying matches:
  68. 1. document=3, weight=1695
  69. id=3
  70. text=????????Noname15?UTP15?5?cat
  71.  
  72. words:
  73. 1. 'патчкордnoname15мutp15м5еcat': 1 documents, 1 hits
  74.  
  75.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement